Package org.jboss.weld.contexts
Class CreationalContextImpl<T>
java.lang.Object
org.jboss.weld.contexts.CreationalContextImpl<T>
- All Implemented Interfaces:
jakarta.enterprise.context.spi.CreationalContext<T>,Serializable,org.jboss.weld.construction.api.WeldCreationalContext<T>,WeldCreationalContext<T>
public class CreationalContextImpl<T>
extends Object
implements jakarta.enterprise.context.spi.CreationalContext<T>, WeldCreationalContext<T>, Serializable
- Author:
- Pete Muir, Ales Justin, Jozef Hartinger
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCreationalContextImpl(jakarta.enterprise.context.spi.Contextual<T> contextual) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddDependentInstance(org.jboss.weld.context.api.ContextualInstance<?> contextualInstance) voidaddDependentResourceReference(org.jboss.weld.injection.spi.ResourceReference<?> resourceReference) Register aResourceReferenceas a dependency.booleancontainsIncompleteInstance(jakarta.enterprise.context.spi.Contextual<?> bean) booleandestroyDependentInstance(T instance) Destroys dependent instancejakarta.enterprise.context.spi.Contextual<T><S> CreationalContextImpl<S>getCreationalContext(jakarta.enterprise.context.spi.Contextual<S> contextual) List<org.jboss.weld.context.api.ContextualInstance<?>>Returns an unmodifiable list of dependent instances.<S> SgetIncompleteInstance(jakarta.enterprise.context.spi.Contextual<S> bean) <S> CreationalContextImpl<S>getProducerReceiverCreationalContext(jakarta.enterprise.context.spi.Contextual<S> contextual) The returnedCreationalContextshares nothing but incomplete instances.booleanvoidvoidregisterAroundConstructCallback(org.jboss.weld.construction.api.AroundConstructCallback<T> callback) voidrelease()voidvoidsetAroundConstructInterceptionContext(InterceptionContext aroundConstructInterceptionContext) voidsetConstructorInterceptionSuppressed(boolean value) protected Object
-
Constructor Details
-
CreationalContextImpl
-
-
Method Details
-
push
- Specified by:
pushin interfacejakarta.enterprise.context.spi.CreationalContext<T>
-
getCreationalContext
public <S> CreationalContextImpl<S> getCreationalContext(jakarta.enterprise.context.spi.Contextual<S> contextual) - Specified by:
getCreationalContextin interfaceWeldCreationalContext<T>
-
getProducerReceiverCreationalContext
public <S> CreationalContextImpl<S> getProducerReceiverCreationalContext(jakarta.enterprise.context.spi.Contextual<S> contextual) Description copied from interface:WeldCreationalContextThe returnedCreationalContextshares nothing but incomplete instances.- Specified by:
getProducerReceiverCreationalContextin interfaceWeldCreationalContext<T>- Returns:
- the
CreationalContextfor a producer reciever
-
getIncompleteInstance
public <S> S getIncompleteInstance(jakarta.enterprise.context.spi.Contextual<S> bean) - Specified by:
getIncompleteInstancein interfaceWeldCreationalContext<T>
-
containsIncompleteInstance
public boolean containsIncompleteInstance(jakarta.enterprise.context.spi.Contextual<?> bean) -
addDependentInstance
public void addDependentInstance(org.jboss.weld.context.api.ContextualInstance<?> contextualInstance) - Specified by:
addDependentInstancein interfaceWeldCreationalContext<T>
-
release
public void release()- Specified by:
releasein interfacejakarta.enterprise.context.spi.CreationalContext<T>- Specified by:
releasein interfaceWeldCreationalContext<T>
-
release
-
getParentCreationalContext
- Specified by:
getParentCreationalContextin interfaceWeldCreationalContext<T>- Returns:
- the parent
CreationalContextor null if there isn't any parent.
-
getDependentInstances
Returns an unmodifiable list of dependent instances.- Specified by:
getDependentInstancesin interfaceWeldCreationalContext<T>
-
writeReplace
- Throws:
ObjectStreamException
-
addDependentResourceReference
public void addDependentResourceReference(org.jboss.weld.injection.spi.ResourceReference<?> resourceReference) Register aResourceReferenceas a dependency.ResourceReference.release()will be called on everyResourceReferenceonce thisCreationalContextinstance is released.- Specified by:
addDependentResourceReferencein interfaceWeldCreationalContext<T>
-
destroyDependentInstance
Destroys dependent instance- Specified by:
destroyDependentInstancein interfaceWeldCreationalContext<T>- Parameters:
instance-- Returns:
- true if the instance was destroyed, false otherwise
-
getContextual
- Specified by:
getContextualin interfaceWeldCreationalContext<T>- Returns:
- the
Contextualfor which thisCreationalContextis created.
-
getAroundConstructCallbacks
-
setConstructorInterceptionSuppressed
public void setConstructorInterceptionSuppressed(boolean value) - Specified by:
setConstructorInterceptionSuppressedin interfaceorg.jboss.weld.construction.api.WeldCreationalContext<T>
-
isConstructorInterceptionSuppressed
public boolean isConstructorInterceptionSuppressed()- Specified by:
isConstructorInterceptionSuppressedin interfaceorg.jboss.weld.construction.api.WeldCreationalContext<T>
-
registerAroundConstructCallback
public void registerAroundConstructCallback(org.jboss.weld.construction.api.AroundConstructCallback<T> callback) - Specified by:
registerAroundConstructCallbackin interfaceorg.jboss.weld.construction.api.WeldCreationalContext<T>
-
getAroundConstructInterceptionContext
- Returns:
- the interception context used for Weld-managed AroundConstruct interceptors or
nullif no such interceptors were applied
-
setAroundConstructInterceptionContext
public void setAroundConstructInterceptionContext(InterceptionContext aroundConstructInterceptionContext)
-