- All Implemented Interfaces:
BeanContainer
,BeanManager
,ELAwareBeanManager
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
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 withNonbinding
.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 withNonbinding
.<T> AnnotatedType
<T> createAnnotatedType
(Class<T> type) Obtain anAnnotatedType
that may be used to read the annotations of the given class or interface.<T> Bean
<T> createBean
(BeanAttributes<T> attributes, Class<T> beanClass, InjectionTargetFactory<T> injectionTargetFactory) <T,
X> Bean <T> createBean
(BeanAttributes<T> attributes, Class<X> beanClass, ProducerFactory<X> producerFactory) createBeanAttributes
(AnnotatedMember<?> type) Obtains aBeanAttributes
for the givenAnnotatedType
.<T> BeanAttributes
<T> createBeanAttributes
(AnnotatedType<T> type) Obtains aBeanAttributes
for the givenAnnotatedType
.<T> CreationalContext
<T> createCreationalContext
(Contextual<T> contextual) Obtain an instance of aCreationalContext
for the given contextual type, or for a non-contextual object.createInjectionPoint
(AnnotatedField<?> field) Obtains a container provided implementation ofInjectionPoint
for the givenAnnotatedField
.createInjectionPoint
(AnnotatedParameter<?> parameter) Obtains a container provided implementation ofInjectionPoint
for the givenAnnotatedParameter
.Obtains anInstance
object to access to beans instances.<T> InterceptionFactory
<T> createInterceptionFactory
(CreationalContext<T> ctx, Class<T> clazz) Create anInterceptionFactory
for the givenCreationalContext
and type.getBeans
(Type beanType, Annotation... 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 theBeanManager
/BeanContainer
was injected or, in the Jakarta EE environment, the Jakarta EE component from whose JNDI environment namespace theBeanManager
/BeanContainer
was obtained, according to the rules of typesafe resolution.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 theBeanManager
/BeanContainer
was injected or, in the Jakarta EE environment, the Jakarta EE component from whose JNDI environment namespace theBeanManager
/BeanContainer
was obtained, according to the rules of EL name resolution.getContext
(Class<? extends Annotation> scopeType) Obtains an active context object for the given scope .getContexts
(Class<? extends Annotation> scopeType) Obtains all context objects, active and inactive, for the given scope.Returns aELResolver
that resolves beans by EL name.getEvent()
Returns an instance of Event with specified typejava.lang.Object
and specified qualifier@Default
It allows typesafe synchronous or asynchronous event firing without injection ofEvent
built-in bean requirement.<T extends Extension>
TgetExtension
(Class<T> extensionClass) Obtains the container's instance of an Extension class declared inMETA-INF/services
.getInjectableReference
(InjectionPoint ij, CreationalContext<?> ctx) Obtains an injectable reference for a certain injection point.<T> InjectionTargetFactory
<T> getInjectionTargetFactory
(AnnotatedType<T> annotatedType) An implementation ofInjectionTargetFactory
that provides container createdInjectionTarget
instances.getInterceptorBindingDefinition
(Class<? extends Annotation> bindingType) Obtains the set of meta-annotations for a certain interceptor binding type .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 withNonbinding
.Bean
<?> Returns thePassivationCapable
bean with the given identifier.<X> ProducerFactory
<X> getProducerFactory
(AnnotatedField<? super X> field, Bean<X> declaringBean) An implementation ofProducerFactory
that provides container createdProducer
instances for the given field.<X> ProducerFactory
<X> getProducerFactory
(AnnotatedMethod<? super X> method, Bean<X> declaringBean) An implementation ofProducerFactory
that provides container createdProducer
instances for the given method.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 withNonbinding
.getReference
(Bean<?> bean, Type beanType, CreationalContext<?> ctx) Obtains a contextual reference for a certain bean and a certain bean type of the bean.getStereotypeDefinition
(Class<? extends Annotation> stereotype) Obtains meta-annotations for a certain stereotype.boolean
isInterceptorBinding
(Class<? extends Annotation> annotationType) Test the given annotation type to determine if it is an interceptor binding type .boolean
isNormalScope
(Class<? extends Annotation> annotationType) Test the given annotation type to determine if it is a normal scope type.boolean
isPassivatingScope
(Class<? extends Annotation> annotationType) Test the given annotation type to determine if it is a passivating scope type.boolean
isQualifier
(Class<? extends Annotation> annotationType) Test the given annotation type to determine if it is a qualifier type.boolean
isScope
(Class<? extends Annotation> annotationType) Test the given annotation type to determine if it is a scope type.boolean
isStereotype
(Class<? extends Annotation> annotationType) Test the given annotation type to determine if it is a stereotype.<X> Bean
<? extends X> Apply the ambiguous dependency resolution rules to a set of beans.resolveDecorators
(Set<Type> types, Annotation... 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 theBeanManager
was injected or the Java EE component from whose JNDI environment namespace theBeanManager
was obtained.List
<Interceptor<?>> resolveInterceptors
(InterceptionType type, Annotation... 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 theBeanManager
/BeanContainer
was injected or, in the Jakarta EE environment, the Jakarta EE component from whose JNDI environment namespace theBeanManager
/BeanContainer
was obtained.<T> Set
<ObserverMethod<? super T>> resolveObserverMethods
(T event, Annotation... qualifiers) Return an ordered set of observer methods for an event.void
validate
(InjectionPoint injectionPoint) Validate a certain injection point.wrapExpressionFactory
(ExpressionFactory expressionFactory) Returns a wrapperExpressionFactory
that delegatesMethodExpression
andValueExpression
creation to the givenExpressionFactory
.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface jakarta.enterprise.inject.spi.BeanContainer
isMatchingBean, isMatchingEvent
-
Constructor Details
-
ELAwareBeanManagerWrapper
-
-
Method Details
-
getELResolver
Description copied from interface:ELAwareBeanManager
Returns aELResolver
that resolves beans by EL name.- Specified by:
getELResolver
in interfaceBeanManager
- Specified by:
getELResolver
in interfaceELAwareBeanManager
- Returns:
- See Also:
-
wrapExpressionFactory
Description copied from interface:ELAwareBeanManager
Returns a wrapperExpressionFactory
that delegatesMethodExpression
andValueExpression
creation to the givenExpressionFactory
. When a Unified EL expression is evaluated using aMethodExpression
orValueExpression
returned by the wrapperExpressionFactory
, the container handles destruction of objects with scopeDependent
.- Specified by:
wrapExpressionFactory
in interfaceBeanManager
- Specified by:
wrapExpressionFactory
in interfaceELAwareBeanManager
- Parameters:
expressionFactory
-- Returns:
- See Also:
-
getReference
Description copied from interface:BeanContainer
Obtains a contextual reference for a certain bean and a certain bean type of the bean.
- Specified by:
getReference
in interfaceBeanContainer
- Parameters:
bean
-beanType
-ctx
-- Returns:
- See Also:
-
createCreationalContext
Description copied from interface:BeanContainer
Obtain an instance of aCreationalContext
for the given contextual type, or for a non-contextual object.- Specified by:
createCreationalContext
in interfaceBeanContainer
- Type Parameters:
T
-- Parameters:
contextual
-- Returns:
- See Also:
-
getBeans
Description copied from interface:BeanContainer
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 theBeanManager
/BeanContainer
was injected or, in the Jakarta EE environment, the Jakarta EE component from whose JNDI environment namespace theBeanManager
/BeanContainer
was obtained, according to the rules of typesafe resolution. If no qualifiers are given, the default qualifier is assumed.Note that when called during invocation of an
AfterBeanDiscovery
event observer, this method will only return beans discovered by the container before theAfterBeanDiscovery
event is fired.- Specified by:
getBeans
in interfaceBeanContainer
- Parameters:
beanType
-qualifiers
-- Returns:
- See Also:
-
getInjectableReference
Description copied from interface:BeanManager
Obtains an injectable reference for a certain injection point.
- Specified by:
getInjectableReference
in interfaceBeanManager
- Parameters:
ij
-ctx
-- Returns:
- See Also:
-
getBeans
Description copied from interface:BeanContainer
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 theBeanManager
/BeanContainer
was injected or, in the Jakarta EE environment, the Jakarta EE component from whose JNDI environment namespace theBeanManager
/BeanContainer
was obtained, according to the rules of EL name resolution.Note that when called during invocation of an
AfterBeanDiscovery
event observer, this method will only return beans discovered by the container before theAfterBeanDiscovery
event is fired.- Specified by:
getBeans
in interfaceBeanContainer
- Parameters:
name
-- Returns:
- See Also:
-
getPassivationCapableBean
Description copied from interface:BeanManager
Returns thePassivationCapable
bean with the given identifier. Note that when called during invocation of anAfterBeanDiscovery
event observer, this method will only return beans discovered by the container before theAfterBeanDiscovery
event is fired.- Specified by:
getPassivationCapableBean
in interfaceBeanManager
- Parameters:
id
-- Returns:
- See Also:
-
resolve
Description copied from interface:BeanContainer
Apply the ambiguous dependency resolution rules to a set of beans.Note that when called during invocation of an
AfterBeanDiscovery
event observer, this method will only return beans discovered by the container before theAfterBeanDiscovery
event is fired.- Specified by:
resolve
in interfaceBeanContainer
- Type Parameters:
X
-- Parameters:
beans
-- Returns:
- See Also:
-
validate
Description copied from interface:BeanManager
Validate a certain injection point. Note that when called during invocation of anAfterBeanDiscovery
event observer, this method will only validate injection points discovered by the container before theAfterBeanDiscovery
event is fired.- Specified by:
validate
in interfaceBeanManager
- Parameters:
injectionPoint
-- See Also:
-
resolveDecorators
Description copied from interface:BeanManager
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 theBeanManager
was injected or the Java EE component from whose JNDI environment namespace theBeanManager
was obtained. Note that when called during invocation of anAfterBeanDiscovery
event observer, this method will only return decorators discovered by the container before theAfterBeanDiscovery
event is fired.- Specified by:
resolveDecorators
in interfaceBeanManager
- Parameters:
types
-qualifiers
-- Returns:
- See Also:
-
resolveObserverMethods
Description copied from interface:BeanContainer
Return an ordered set of observer methods for an event.Note that when called during invocation of an
AfterBeanDiscovery
event observer, this method will only return observers discovered by the container before theAfterBeanDiscovery
event is fired.- Specified by:
resolveObserverMethods
in interfaceBeanContainer
- Type Parameters:
T
-- Parameters:
event
-qualifiers
-- Returns:
- See Also:
-
resolveInterceptors
public List<Interceptor<?>> resolveInterceptors(InterceptionType type, Annotation... interceptorBindings) Description copied from interface:BeanContainer
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 theBeanManager
/BeanContainer
was injected or, in the Jakarta EE environment, the Jakarta EE component from whose JNDI environment namespace theBeanManager
/BeanContainer
was obtained.Note that when called during invocation of an
AfterBeanDiscovery
event observer, this method will only return interceptors discovered by the container before theAfterBeanDiscovery
event is fired.- Specified by:
resolveInterceptors
in interfaceBeanContainer
- Parameters:
type
-interceptorBindings
-- Returns:
- See Also:
-
isPassivatingScope
Description copied from interface:BeanManager
Test the given annotation type to determine if it is a passivating scope type.- Specified by:
isPassivatingScope
in interfaceBeanManager
- Parameters:
annotationType
-- Returns:
- See Also:
-
getInterceptorBindingDefinition
Description copied from interface:BeanManager
Obtains the set of meta-annotations for a certain interceptor binding type .- Specified by:
getInterceptorBindingDefinition
in interfaceBeanManager
- Parameters:
bindingType
-- Returns:
- See Also:
-
getStereotypeDefinition
Description copied from interface:BeanManager
Obtains meta-annotations for a certain stereotype.- Specified by:
getStereotypeDefinition
in interfaceBeanManager
- Parameters:
stereotype
-- Returns:
- See Also:
-
areQualifiersEquivalent
Description copied from interface:BeanManager
Determine if two qualifiers are considered equivalent for the purposes of typesafe resolution, taking into account any members annotated withNonbinding
.- Specified by:
areQualifiersEquivalent
in interfaceBeanManager
- Parameters:
qualifier1
-qualifier2
-- Returns:
- See Also:
-
isScope
Description copied from interface:BeanContainer
Test the given annotation type to determine if it is a scope type.- Specified by:
isScope
in interfaceBeanContainer
- Parameters:
annotationType
-- Returns:
- See Also:
-
areInterceptorBindingsEquivalent
public boolean areInterceptorBindingsEquivalent(Annotation interceptorBinding1, Annotation interceptorBinding2) Description copied from interface:BeanManager
Determine if two interceptor bindings are considered equivalent for the purposes of typesafe resolution, taking into account any members annotated withNonbinding
.- Specified by:
areInterceptorBindingsEquivalent
in interfaceBeanManager
- Parameters:
interceptorBinding1
-interceptorBinding2
-- Returns:
- See Also:
-
isNormalScope
Description copied from interface:BeanContainer
Test the given annotation type to determine if it is a normal scope type.- Specified by:
isNormalScope
in interfaceBeanContainer
- Parameters:
annotationType
-- Returns:
- See Also:
-
getQualifierHashCode
Description copied from interface:BeanManager
Determine the hash code of a qualifier, using the JDK algorithm for determining an annotation hash code, ignoring any members annotated withNonbinding
.- Specified by:
getQualifierHashCode
in interfaceBeanManager
- Parameters:
qualifier
-- Returns:
- See Also:
-
isQualifier
Description copied from interface:BeanContainer
Test the given annotation type to determine if it is a qualifier type.- Specified by:
isQualifier
in interfaceBeanContainer
- Parameters:
annotationType
-- Returns:
- See Also:
-
getInterceptorBindingHashCode
Description copied from interface:BeanManager
Determine the hash code of an interceptor binding, using the JDK algorithm for determining an annotation hash code, ignoring any members annotated withNonbinding
.- Specified by:
getInterceptorBindingHashCode
in interfaceBeanManager
- Parameters:
interceptorBinding
-- Returns:
- See Also:
-
isStereotype
Description copied from interface:BeanContainer
Test the given annotation type to determine if it is a stereotype.- Specified by:
isStereotype
in interfaceBeanContainer
- Parameters:
annotationType
-- Returns:
- See Also:
-
isInterceptorBinding
Description copied from interface:BeanContainer
Test the given annotation type to determine if it is an interceptor binding type .- Specified by:
isInterceptorBinding
in interfaceBeanContainer
- Parameters:
annotationType
-- Returns:
- See Also:
-
getContext
Description copied from interface:BeanContainer
Obtains an active context object for the given scope .- Specified by:
getContext
in interfaceBeanContainer
- Parameters:
scopeType
-- Returns:
- See Also:
-
getContexts
Description copied from interface:BeanContainer
Obtains all context objects, active and inactive, for the given scope.- Specified by:
getContexts
in interfaceBeanContainer
- Parameters:
scopeType
-- Returns:
- See Also:
-
createAnnotatedType
Description copied from interface:BeanManager
Obtain anAnnotatedType
that may be used to read the annotations of the given class or interface.- Specified by:
createAnnotatedType
in interfaceBeanManager
- Type Parameters:
T
-- Parameters:
type
-- Returns:
- See Also:
-
getEvent
Description copied from interface:BeanContainer
Returns an instance of Event with specified typejava.lang.Object
and specified qualifier@Default
It allows typesafe synchronous or asynchronous event firing without injection ofEvent
built-in bean requirement.- Specified by:
getEvent
in interfaceBeanContainer
- Returns:
- See Also:
-
getInjectionTargetFactory
Description copied from interface:BeanManager
An implementation of
InjectionTargetFactory
that provides container createdInjectionTarget
instances.This factory can be wrapped to add behavior to container created injection targets.
- Specified by:
getInjectionTargetFactory
in interfaceBeanManager
- Type Parameters:
T
-- Parameters:
annotatedType
-- Returns:
- See Also:
-
createInstance
Description copied from interface:BeanContainer
Obtains anInstance
object to access to beans instances.The returned
Instance
object can only access instances of beans that are available for injection in the module or library containing the class into which theBeanManager
/BeanContainer
was injected or, in the Jakarta EE environment, the Jakarta EE component from whose JNDI environment namespace theBeanContainer
was obtained, according to the rules of typesafe resolution.Instances of dependent scoped beans obtained with this
Instance
must be explicitly destroyed by callingInstance.destroy(Object)
If no qualifier is passed to
Instance.select(java.lang.annotation.Annotation...)
method, the@Default
qualifier is assumed.- Specified by:
createInstance
in interfaceBeanContainer
- Returns:
- See Also:
-
getProducerFactory
public <X> ProducerFactory<X> getProducerFactory(AnnotatedField<? super X> field, Bean<X> declaringBean) Description copied from interface:BeanManager
An implementation of
ProducerFactory
that provides container createdProducer
instances for the given field.This factory can be wrapped to add behavior to container created producers.
- Specified by:
getProducerFactory
in interfaceBeanManager
- Type Parameters:
X
-- Parameters:
field
-declaringBean
-- Returns:
- See Also:
-
getProducerFactory
public <X> ProducerFactory<X> getProducerFactory(AnnotatedMethod<? super X> method, Bean<X> declaringBean) Description copied from interface:BeanManager
An implementation of
ProducerFactory
that provides container createdProducer
instances for the given method.This factory can be wrapped to add behavior to container created producers.
- Specified by:
getProducerFactory
in interfaceBeanManager
- Type Parameters:
X
-- Parameters:
method
-declaringBean
-- Returns:
- See Also:
-
createBeanAttributes
Description copied from interface:BeanManager
Obtains aBeanAttributes
for the givenAnnotatedType
. The container ignores the annotations and types declared by the elements of the actual Java class and uses the metadata provided via theAnnotated
interface instead.- Specified by:
createBeanAttributes
in interfaceBeanManager
- Type Parameters:
T
-- Parameters:
type
-- Returns:
- See Also:
-
createBeanAttributes
Description copied from interface:BeanManager
Obtains aBeanAttributes
for the givenAnnotatedType
. The container ignores the annotations and types declared by the elements of the actual Java class and uses the metadata provided via theAnnotated
interface instead.- Specified by:
createBeanAttributes
in interfaceBeanManager
- Parameters:
type
-- Returns:
- See Also:
-
createBean
public <T> Bean<T> createBean(BeanAttributes<T> attributes, Class<T> beanClass, InjectionTargetFactory<T> injectionTargetFactory) Description copied from interface:BeanManager
Obtains a
Bean
for the givenBeanAttributes
, bean class andInjectionTarget
.The
InjectionTarget
creates and destroys instances of the bean, performs dependency injection and lifecycle callbacks, and determines the return value ofBean.getInjectionPoints()
. TheInjectionTarget
is obtained from theInjectionTargetFactory
.BeanManager.getInjectionTargetFactory(AnnotatedType)
allows use of a container createdInjectionTarget
.- Specified by:
createBean
in interfaceBeanManager
- Type Parameters:
T
-- Parameters:
attributes
-beanClass
-injectionTargetFactory
-- Returns:
- See Also:
-
createBean
public <T,X> Bean<T> createBean(BeanAttributes<T> attributes, Class<X> beanClass, ProducerFactory<X> producerFactory) Description copied from interface:BeanManager
Obtains a
Bean
for the givenBeanAttributes
, bean class andProducer
.The
Producer
creates and destroys instances of the decorator, and determines the return value ofBean.getInjectionPoints()
. TheProducer
is obtained from theProducerFactory
.BeanManager.getProducerFactory(AnnotatedMethod, Bean)
orBeanManager.getProducerFactory(AnnotatedField, Bean)
allows use of a container createdProducer
.- Specified by:
createBean
in interfaceBeanManager
- Type Parameters:
T
-X
-- Parameters:
attributes
-beanClass
-producerFactory
-- Returns:
- See Also:
-
createInjectionPoint
Description copied from interface:BeanManager
Obtains a container provided implementation ofInjectionPoint
for the givenAnnotatedField
.- Specified by:
createInjectionPoint
in interfaceBeanManager
- Parameters:
field
-- Returns:
- See Also:
-
createInjectionPoint
Description copied from interface:BeanManager
Obtains a container provided implementation ofInjectionPoint
for the givenAnnotatedParameter
.- Specified by:
createInjectionPoint
in interfaceBeanManager
- Parameters:
parameter
-- Returns:
- See Also:
-
getExtension
Description copied from interface:BeanManager
Obtains the container's instance of an Extension class declared inMETA-INF/services
.- Specified by:
getExtension
in interfaceBeanManager
- Type Parameters:
T
-- Parameters:
extensionClass
-- Returns:
- See Also:
-
createInterceptionFactory
public <T> InterceptionFactory<T> createInterceptionFactory(CreationalContext<T> ctx, Class<T> clazz) Description copied from interface:BeanManager
Create anInterceptionFactory
for the givenCreationalContext
and type.- Specified by:
createInterceptionFactory
in interfaceBeanManager
- Type Parameters:
T
-- Parameters:
ctx
-clazz
-- Returns:
- See Also:
-