Package org.jboss.weld.contexts.unbound
Class DependentContextImpl
- java.lang.Object
-
- org.jboss.weld.contexts.unbound.DependentContextImpl
-
- All Implemented Interfaces:
AlterableContext,Context,DependentContext
public class DependentContextImpl extends Object implements DependentContext
The dependent context- Author:
- Nicklas Karlsson
-
-
Constructor Summary
Constructors Constructor Description DependentContextImpl(org.jboss.weld.serialization.spi.ContextualStore contextualStore)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected <T> voidaddDependentInstance(T instance, Contextual<T> contextual, WeldCreationalContext<T> creationalContext)voiddestroy(Contextual<?> contextual)Destroy the existing contextual instance.<T> Tget(Contextual<T> contextual)Return an existing instance of a certain contextual type or a null value.<T> Tget(Contextual<T> contextual, CreationalContext<T> creationalContext)Overridden method always creating a new instanceClass<? extends Annotation>getScope()Get the scope type of the context object.booleanisActive()Determines if the context object is active.
-
-
-
Method Detail
-
get
public <T> T get(Contextual<T> contextual, CreationalContext<T> creationalContext)
Overridden method always creating a new instance
-
addDependentInstance
protected <T> void addDependentInstance(T instance, Contextual<T> contextual, WeldCreationalContext<T> creationalContext)
-
get
public <T> T get(Contextual<T> contextual)
Description copied from interface:ContextReturn an existing instance of a certain contextual type or a null value.
-
isActive
public boolean isActive()
Description copied from interface:ContextDetermines if the context object is active.
-
getScope
public Class<? extends Annotation> getScope()
Description copied from interface:ContextGet the scope type of the context object.
-
destroy
public void destroy(Contextual<?> contextual)
Description copied from interface:AlterableContextDestroy the existing contextual instance. If there is no existing instance, no action is taken.
- Specified by:
destroyin interfaceAlterableContext- Parameters:
contextual- the contextual type
-
-