Allows a portable extension to interact directly with the container. Provides operations for obtaining contextual references for beans, along with many other operations of use to portable extensions.
In CDI Lite environment, applications may obtain a BeanManager, but invoking methods that are not inherited
from BeanContainer results in non-portable behavior.
Any bean may obtain an instance of BeanManager by injecting it:
@Inject BeanManager manager;
Java EE components may obtain an instance of BeanManager from JNDI by looking up the name
java:comp/BeanManager.
Most operations of BeanManager may be called at any time during the execution of the application.
However, the following operations must not be called before the AfterBeanDiscovery event is fired:
getBeans(String),getBeans(java.lang.reflect.Type, java.lang.annotation.Annotation...),getPassivationCapableBean(String),resolve(java.util.Set),resolveDecorators(java.util.Set, java.lang.annotation.Annotation...),resolveInterceptors(InterceptionType, java.lang.annotation.Annotation...),resolveObserverMethods(Object, java.lang.annotation.Annotation...),validate(InjectionPoint),createInstance()
and the following operations must not be called before the AfterDeploymentValidation event is fired:
getReference(Bean, java.lang.reflect.Type, CreationalContext),getInjectableReference(InjectionPoint, CreationalContext),or the container will throw an Exception.
| Modifier and Type | Method and Description |
|---|---|
| public boolean | Returns: true if the two interceptor bindings are equivalent, otherwise falsean interceptor binding to check interceptorBinding1, Annotation an interceptor binding to check interceptorBinding2)Determine if two interceptor bindings are considered equivalent for the purposes of typesafe resolution, taking into
account any members annotated with |
| public boolean | Returns: true if the two qualifiers are equivalent, otherwise falsea qualifier to check qualifier1, Annotation a qualifier to check qualifier2)Determine if two qualifiers are considered equivalent for the purposes of typesafe resolution, taking into account any
members annotated with |
| public < the class or interface T> AnnotatedType | Returns: theAnnotatedTypethe type)java.lang.Class objectObtain an |
| public < the type T> Bean | Returns: a container provided implementation ofBeana attributes, Class<T> BeanAttributes which determines the bean types, qualifiers, scope, name and stereotypes of
the returned Bean, and the return value of Bean#isAlternative()a class, which determines the return value of beanClass, InjectionTargetFactory<T> Bean#getBeanClass()an injectionTargetFactory)InjectionTargetFactory, used to obtain an InjectionTarget
Obtains a |
| public < the type T, the type of the declaring bean X> Bean | Returns: a container provided implementation ofBeana attributes, Class<X> BeanAttributes which determines the bean types, qualifiers, scope, name and stereotypes of
the returned Bean, and the return value of Bean#isAlternative()a class, which determines the return value of beanClass, ProducerFactory<X> Bean.getClass()a producerFactory)ProducerFactory, used to obtain a Producer
Obtains a |
| public < the type T> BeanAttributes | Returns: a container provided implementation ofInjectionTargetthe type)AnnotatedTypeObtains a |
| public BeanAttributes | Returns: a container provided implementation ofInjectionTargetthe type)AnnotatedTypeObtains a |
| public InjectionPoint | Returns: the container providedInjectionPointthe field)AnnotatedField defining the injection pointObtains a container provided implementation of |
| public InjectionPoint | Returns: the container providedInjectionPointthe parameter)AnnotatedParameter defining the injection pointObtains a container provided implementation of |
| public < type of the instance this factory will work on T> InterceptionFactory | Returns: a newInterceptionFactory to add services on on instances of TCreationalContext for the InterceptionFactory to createclass of the instance this factory will work on clazz)Create an |
| public ELResolver | Returns: thejakarta.el.ELResolverReturns a |
| public < the type of the extension T extends Extension> T | Returns: the extension instancethe type of the extension class extensionClass)Obtains the container's instance of an Extension class declared in |
| public Object | Returns: the injectable referencethe target injection point ij, CreationalContext<?> a ctx)CreationalContext that may be used to destroy any object with scope
Dependent that is createdObtains an injectable reference for a certain injection point. |
| public < the type T> InjectionTargetFactory | Returns: anInjectionTargetFactorythe annotated type to create the injection target factory for annotatedType)
An implementation of |
| public Set | Returns: the set of meta-annotationsObtains the set of meta-annotations for a certain interceptor binding type . |
| public int | Returns: the hashCode for the interceptor bindingthe interceptor binding to consider interceptorBinding)Determine the hash code of an interceptor binding, using the JDK algorithm for determining an annotation hash code,
ignoring any members annotated with |
| public Bean | Returns: aBean that implements PassivationCapable and has the given
identifier, or a null value if there is no such beanthe identifier id)Returns the |
| public < the declaring type X> ProducerFactory | Returns: the producer factory for the fieldthe field to create the producer factory for field, Bean<X> the bean declaring the producer. May be null if the producer is static or the declaring object is
non-contextual declaringBean)
An implementation of |
| public < bean type X> ProducerFactory | Returns: the producer factory for the methodthe method to create the producer factory for method, Bean<X> the bean declaring the producer. May be null if the producer is static or the declaring object is
non-contextual declaringBean)
An implementation of |
| public int | Returns: the hashCode for the qualifierthe qualifier to consider qualifier)Determine the hash code of a qualifier, using the JDK algorithm for determining an annotation hash code, ignoring any
members annotated with |
| public Set | Returns: the set of meta-annotationsthe stereotype stereotype)Obtains meta-annotations for a certain stereotype. |
| public boolean | Returns: true if the annotation type is a passivating scope typethe annotation type annotationType)Test the given annotation type to determine if it is a passivating scope type. |
| public List | Returns: the resulting set of decoratorsthe set of bean types of the decorated bean types, Annotation... the qualifiers declared by the decorated bean qualifiers)Return an ordered list of decorators for a set of bean types and a set of qualifiers and which are
enabled in the module or library containing the class into which the |
| public < the type of the event T> Set | Returns: the resulting set of observer methodsthe event object event, Annotation... the event qualifiers qualifiers)Redeclares jakarta. |
| public void | validate(InjectionPoint
the injection point to validate injectionPoint)Validate a certain injection point. |
| public ExpressionFactory | Returns: the wrappedjakarta.el.ExpressionFactorythe expressionFactory)jakarta.el.ExpressionFactory to wrapReturns a wrapper |
| areInterceptorBindingsEquivalent | back to summary |
|---|---|
| public boolean areInterceptorBindingsEquivalent(Annotation interceptorBinding1, Annotation interceptorBinding2) Determine if two interceptor bindings are considered equivalent for the purposes of typesafe resolution, taking into
account any members annotated with
| |
| areQualifiersEquivalent | back to summary |
|---|---|
| public boolean areQualifiersEquivalent(Annotation qualifier1, Annotation qualifier2) Determine if two qualifiers are considered equivalent for the purposes of typesafe resolution, taking into account any
members annotated with
| |
| createAnnotatedType | back to summary |
|---|---|
| public <T> AnnotatedType Obtain an
| |
| createBean | back to summary |
|---|---|
| public <T> Bean
Obtains a
The
| |
| createBean | back to summary |
|---|---|
| public <T, X> Bean
Obtains a
The
| |
| createBeanAttributes | back to summary |
|---|---|
| public <T> BeanAttributes Obtains a
| |
| createBeanAttributes | back to summary |
|---|---|
| public BeanAttributes Obtains a
| |
| createInjectionPoint | back to summary |
|---|---|
| public InjectionPoint createInjectionPoint(AnnotatedField<?> field) Obtains a container provided implementation of
| |
| createInjectionPoint | back to summary |
|---|---|
| public InjectionPoint createInjectionPoint(AnnotatedParameter<?> parameter) Obtains a container provided implementation of
| |
| createInterceptionFactory | back to summary |
|---|---|
| public <T> InterceptionFactory Create an
| |
| getELResolver | back to summary |
|---|---|
| public ELResolver getELResolver() Returns a
| |
| getExtension | back to summary |
|---|---|
| public <T extends Extension> T getExtension(Class<T> extensionClass) Obtains the container's instance of an Extension class declared in
| |
| getInjectableReference | back to summary |
|---|---|
| public Object getInjectableReference(InjectionPoint ij, CreationalContext<?> ctx) Obtains an injectable reference for a certain injection point.
| |
| getInjectionTargetFactory | back to summary |
|---|---|
| public <T> InjectionTargetFactory
An implementation of This factory can be wrapped to add behavior to container created injection targets.
| |
| getInterceptorBindingDefinition | back to summary |
|---|---|
| public Set Obtains the set of meta-annotations for a certain interceptor binding type .
| |
| getInterceptorBindingHashCode | back to summary |
|---|---|
| public int getInterceptorBindingHashCode(Annotation interceptorBinding) Determine the hash code of an interceptor binding, using the JDK algorithm for determining an annotation hash code,
ignoring any members annotated with
| |
| getPassivationCapableBean | back to summary |
|---|---|
| public Bean Returns the
| |
| getProducerFactory | back to summary |
|---|---|
| public <X> ProducerFactory
An implementation of This factory can be wrapped to add behavior to container created producers.
| |
| getProducerFactory | back to summary |
|---|---|
| public <X> ProducerFactory
An implementation of This factory can be wrapped to add behavior to container created producers.
| |
| getQualifierHashCode | back to summary |
|---|---|
| public int getQualifierHashCode(Annotation qualifier) Determine the hash code of a qualifier, using the JDK algorithm for determining an annotation hash code, ignoring any
members annotated with
| |
| getStereotypeDefinition | back to summary |
|---|---|
| public Set Obtains meta-annotations for a certain stereotype.
| |
| isPassivatingScope | back to summary |
|---|---|
| public boolean isPassivatingScope(Class<? extends Annotation> annotationType) Test the given annotation type to determine if it is a passivating scope type.
| |
| resolveDecorators | back to summary |
|---|---|
| public List Return an ordered list of decorators for a set of bean types and a set of qualifiers and which are
enabled in the module or library containing the class into which the
| |
| resolveObserverMethods | back to summary |
|---|---|
| public <T> Set Redeclares jakarta. Return an ordered set of observer methods for an event.
Note that when called during invocation of an
| |
| validate | back to summary |
|---|---|
| public void validate(InjectionPoint injectionPoint) Validate a certain injection point.
Note that when called during invocation of an
| |
| wrapExpressionFactory | back to summary |
|---|---|
| public ExpressionFactory wrapExpressionFactory(ExpressionFactory expressionFactory) Returns a wrapper
| |