BeanContainer is a superclass of BeanManager containing capabilities that are portable across
all CDI environments.
Provides operations for obtaining contextual references for beans, along with many other operations of use to CDI applications.
Any bean may obtain an instance of BeanContainer by injecting it:
@Inject BeanContainer container;
| Modifier and Type | Method and Description |
|---|---|
| public < type of the instance T> CreationalContext | Returns: the newCreationalContextthe contextual)Contextual, or a null value in the case of a non-contextual
objectObtain an instance of a |
| public Instance | Returns: anInstance object to request beans instancesObtains an |
| public Set | Returns: the resulting set of beansthe required bean type beanType, Annotation... the required qualifiers qualifiers)Return the set of beans which have the given required type and qualifiers and are available for injection in the module
or library containing the class into which the |
| public Set | Returns: the resulting set of beansthe EL name name)Return the set of beans which have the given EL name and are available for injection in the module or library containing
the class into which the |
| public Context | Returns: the context objectthe scope scopeType)Obtains an active context object for the given scope . |
| public Event | |
| public Object | Returns: a contextual reference representing the beanthe bean, Type Bean object representing the beana bean type that must be implemented by any client proxy that is returned beanType, CreationalContext<?> a ctx)CreationalContext that may be used to destroy any object with scope
Dependent that is createdObtains a contextual reference for a certain bean and a certain bean type of the bean. |
| public boolean | isInterceptorBinding(Class<? extends Annotation>
the annotation to test annotationType)Test the given annotation type to determine if it is an interceptor binding type . |
| public boolean | isNormalScope(Class<? extends Annotation>
the annotation type annotationType)Test the given annotation type to determine if it is a normal scope type. |
| public boolean | isQualifier(Class<? extends Annotation>
the annotation type annotationType)Test the given annotation type to determine if it is a qualifier type. |
| public boolean | Returns: true if the annotation type is a scope typethe annotation type annotationType)Test the given annotation type to determine if it is a scope type. |
| public boolean | isStereotype(Class<? extends Annotation>
the annotation type annotationType)Test the given annotation type to determine if it is a stereotype. |
| public < a common type of the beans X> Bean | |
| public List | Returns: the resulting set of interceptorsthe type of the interception type, Annotation... the interceptor bindings interceptorBindings)Return an ordered list of enabled interceptors for a set of interceptor bindings and a type of
interception 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)Return an ordered set of observer methods for an event. |
| createCreationalContext | back to summary |
|---|---|
| public <T> CreationalContext Obtain an instance of a
| |
| createInstance | back to summary |
|---|---|
| public Instance Obtains an
The returned
Note that when called during invocation of an
Instances of dependent scoped beans obtained with this
If no qualifier is passed to
| |
| getBeans | back to summary |
|---|---|
| public Set Return the set of beans which have the given required type and qualifiers and are available for injection in the module
or library containing the class into which the
Note that when called during invocation of an
| |
| getBeans | back to summary |
|---|---|
| public Set Return the set of beans which have the given EL name and are available for injection in the module or library containing
the class into which the
Note that when called during invocation of an
| |
| getContext | back to summary |
|---|---|
| public Context getContext(Class<? extends Annotation> scopeType) Obtains an active context object for the given scope .
| |
| getEvent | back to summary |
|---|---|
| public Event Returns an instance of Event with specified type | |
| getReference | back to summary |
|---|---|
| public Object getReference(Bean<?> bean, Type beanType, CreationalContext<?> ctx) Obtains a contextual reference for a certain bean and a certain bean type of the bean.
| |
| isInterceptorBinding | back to summary |
|---|---|
| public boolean isInterceptorBinding(Class<? extends Annotation> annotationType) Test the given annotation type to determine if it is an interceptor binding type .
| |
| isNormalScope | back to summary |
|---|---|
| public boolean isNormalScope(Class<? extends Annotation> annotationType) Test the given annotation type to determine if it is a normal scope type.
| |
| isQualifier | back to summary |
|---|---|
| public boolean isQualifier(Class<? extends Annotation> annotationType) Test the given annotation type to determine if it is a qualifier type.
| |
| isScope | back to summary |
|---|---|
| public boolean isScope(Class<? extends Annotation> annotationType) Test the given annotation type to determine if it is a scope type.
| |
| isStereotype | back to summary |
|---|---|
| public boolean isStereotype(Class<? extends Annotation> annotationType) Test the given annotation type to determine if it is a stereotype.
| |
| resolve | back to summary |
|---|---|
| public <X> Bean Apply the ambiguous dependency resolution rules to a set of beans.
Note that when called during invocation of an
| |
| resolveInterceptors | back to summary |
|---|---|
| public List Return an ordered list of enabled interceptors for a set of interceptor bindings and a type of
interception and which are enabled in the module or library containing the class into which the
Note that when called during invocation of an
| |
| resolveObserverMethods | back to summary |
|---|---|
| public <T> Set Return an ordered set of observer methods for an event.
Note that when called during invocation of an
| |