public interface WeldManager extends javax.enterprise.inject.spi.BeanManager, Serializable
BeanManager.| Modifier and Type | Method and Description |
|---|---|
<T> javax.enterprise.inject.spi.AnnotatedType<T> |
createAnnotatedType(Class<T> type,
String id)
Obtain an
AnnotatedType that may be used to read the annotations of the given class or interface. |
<T> WeldCreationalContext<T> |
createCreationalContext(javax.enterprise.context.spi.Contextual<T> contextual) |
<T> javax.enterprise.inject.spi.InjectionTarget<T> |
createInjectionTarget(EjbDescriptor<T> descriptor)
The injection target for the given EJB, or null if Weld was not given this descriptor in the deployment.
|
<T> WeldInjectionTargetBuilder<T> |
createInjectionTargetBuilder(javax.enterprise.inject.spi.AnnotatedType<T> type)
Returns a new instance of
WeldInjectionTargetBuilder which can be used to create a new WeldInjectionTarget for the specified type. |
<T> void |
disposeAnnotatedType(Class<T> type,
String id)
Dispose the
AnnotatedType created for the identified type. |
<X> javax.enterprise.inject.spi.InjectionTarget<X> |
fireProcessInjectionTarget(javax.enterprise.inject.spi.AnnotatedType<X> type)
Fire a ProcessInjectionTarget event for the given type.
|
<X> javax.enterprise.inject.spi.InjectionTarget<X> |
fireProcessInjectionTarget(javax.enterprise.inject.spi.AnnotatedType<X> annotatedType,
javax.enterprise.inject.spi.InjectionTarget<X> injectionTarget)
Fire a ProcessInjectionTarget event for the given type.
|
default Collection<javax.enterprise.context.spi.Context> |
getActiveContexts()
Returns an unmodifiable collection of all currently active
Contexts. |
default Collection<WeldAlterableContext> |
getActiveWeldAlterableContexts()
Returns an unmodifiable collection of all currently active
Contexts that implement WeldAlterableContext. |
<T> javax.enterprise.inject.spi.Bean<T> |
getBean(EjbDescriptor<T> descriptor)
Get the Bean object for the given EJB, or null if Weld was not given this descriptor in the deployment.
|
<T> EjbDescriptor<T> |
getEjbDescriptor(String ejbName)
Get the EjbDescriptor for the given EJB name
|
String |
getId()
The ID of the manager, identical to the ID provided by the BDA
|
<T> WeldInjectionTargetFactory<T> |
getInjectionTargetFactory(javax.enterprise.inject.spi.AnnotatedType<T> type) |
javax.enterprise.inject.spi.Bean<?> |
getPassivationCapableBean(BeanIdentifier identifier) |
Collection<Class<? extends Annotation>> |
getScopes()
Returns an unmodifiable collection of all registered scopes, both built-in and custom.
|
ServiceRegistry |
getServices()
Get the services registered for this manager
|
javax.enterprise.inject.Instance<Object> |
instance() |
boolean |
isContextActive(Class<? extends Annotation> scopeType)
Indicates whether there is an active context for a given scope.
|
WeldManager |
unwrap() |
areInterceptorBindingsEquivalent, areQualifiersEquivalent, createAnnotatedType, createBean, createBean, createBeanAttributes, createBeanAttributes, createInjectionPoint, createInjectionPoint, createInjectionTarget, createInstance, createInterceptionFactory, fireEvent, getBeans, getBeans, getContext, getELResolver, getEvent, getExtension, getInjectableReference, getInterceptorBindingDefinition, getInterceptorBindingHashCode, getPassivationCapableBean, getProducerFactory, getProducerFactory, getQualifierHashCode, getReference, getStereotypeDefinition, isInterceptorBinding, isNormalScope, isPassivatingScope, isQualifier, isScope, isStereotype, resolve, resolveDecorators, resolveInterceptors, resolveObserverMethods, validate, wrapExpressionFactory<T> javax.enterprise.inject.spi.InjectionTarget<T> createInjectionTarget(EjbDescriptor<T> descriptor)
fireProcessInjectionTarget(AnnotatedType) and
fireProcessInjectionTarget(AnnotatedType, InjectionTarget)
must be used to obtain an InjectionTarget for non-contextual EJB injection.T - the type of the EJBdescriptor - the given EJB descriptor<T> javax.enterprise.inject.spi.Bean<T> getBean(EjbDescriptor<T> descriptor)
T - the type of the beandescriptor - the given EJB descriptor<T> EjbDescriptor<T> getEjbDescriptor(String ejbName)
T - the type of the EJBejbName - the given EJB nameServiceRegistry getServices()
<X> javax.enterprise.inject.spi.InjectionTarget<X> fireProcessInjectionTarget(javax.enterprise.inject.spi.AnnotatedType<X> type)
X - the typetype - the type<X> javax.enterprise.inject.spi.InjectionTarget<X> fireProcessInjectionTarget(javax.enterprise.inject.spi.AnnotatedType<X> annotatedType,
javax.enterprise.inject.spi.InjectionTarget<X> injectionTarget)
X - the typeannotatedType - the typeinjectionTarget - the injection targetString getId()
javax.enterprise.inject.Instance<Object> instance()
<T> WeldInjectionTargetFactory<T> getInjectionTargetFactory(javax.enterprise.inject.spi.AnnotatedType<T> type)
getInjectionTargetFactory in interface javax.enterprise.inject.spi.BeanManager<T> WeldCreationalContext<T> createCreationalContext(javax.enterprise.context.spi.Contextual<T> contextual)
createCreationalContext in interface javax.enterprise.inject.spi.BeanManagerjavax.enterprise.inject.spi.Bean<?> getPassivationCapableBean(BeanIdentifier identifier)
<T> WeldInjectionTargetBuilder<T> createInjectionTargetBuilder(javax.enterprise.inject.spi.AnnotatedType<T> type)
WeldInjectionTargetBuilder which can be used to create a new WeldInjectionTarget for the specified type.T - the typetype - the specified typeWeldInjectionTargetBuilder instance for the specified typeWeldManager unwrap()
<T> javax.enterprise.inject.spi.AnnotatedType<T> createAnnotatedType(Class<T> type, String id)
AnnotatedType that may be used to read the annotations of the given class or interface.
Allows multiple annotated types, based on the same underlying type, to be created. AnnotatedTypes discovered by the container use the fully
qualified class name to identify the type.
This method must only be used when creating non-contextual instances, such as Java EE components. It's not designed to work with contextual instances.
If called after the container bootstrap finished, the client code is required to explicitly call disposeAnnotatedType(Class, String)
as soon as the specified type should be garbage-collected (to avoid memory leaks).
type - id - AnnotatedType<T> void disposeAnnotatedType(Class<T> type, String id)
AnnotatedType created for the identified type.
This method should be explicitly called for each result of createAnnotatedType(Class, String) created after the container bootstrap finished.
It's not necessary to call this method unless the identified type should be a subject of garbage collection.
type - id - createAnnotatedType(Class, String)boolean isContextActive(Class<? extends Annotation> scopeType)
scopeType - IllegalStateException - if there are multiple active contexts for a given scopeCollection<Class<? extends Annotation>> getScopes()
BeanManager#getContext()
to retrieve the Context.
The method returns scopes regardless of whether their respective contexts are active or otherwise.default Collection<javax.enterprise.context.spi.Context> getActiveContexts()
Contexts. This is just a convenient method.
Note that for each scope, there might be more than one Context, but there can be at most one active at a time.Contextsdefault Collection<WeldAlterableContext> getActiveWeldAlterableContexts()
Contexts that implement WeldAlterableContext.
This is just a convenient method.
Note that for each scope, there might be more than one Context, but there can be at most one active at a time.
This method can therefore return an incomplete view of all active contexts as not every context implements WeldAlterableContext.WeldAlterableContextCopyright © 2008–2019. All rights reserved.