public interface BeanManager
Modifier and Type | Method and Description |
---|---|
<T> AnnotatedType<T> |
createAnnotatedType(java.lang.Class<T> type)
Creates an introspected annotated type.
|
<T> CreationalContext<T> |
createCreationalContext(Contextual<T> contextual)
Creates a new CreationalContext for instantiating a bean.
|
<T> InjectionTarget<T> |
createInjectionTarget(AnnotatedType<T> type)
Creates an injection target
|
void |
fireEvent(java.lang.Object event,
java.lang.annotation.Annotation... qualifiers)
Fires an event
|
java.util.Set<Bean<?>> |
getBeans(java.lang.String name)
Returns the bean definitions matching a given name
|
java.util.Set<Bean<?>> |
getBeans(java.lang.reflect.Type beanType,
java.lang.annotation.Annotation... qualiviers)
Returns the beans matching a class and annotation set
|
Context |
getContext(java.lang.Class<? extends java.lang.annotation.Annotation> scopeType)
Returns the scope context for the given type
|
ELResolver |
getELResolver()
Returns the BeanManager's EL resolver.
|
java.lang.Object |
getInjectableReference(InjectionPoint ij,
CreationalContext<?> ctx)
Internal callback during creation to get a new injection instance.
|
java.util.Set<java.lang.annotation.Annotation> |
getInterceptorBindingDefinition(java.lang.Class<? extends java.lang.annotation.Annotation> bindingType)
Returns the bindings for an interceptor binding type
|
Bean<?> |
getPassivationCapableBean(java.lang.String id)
Returns the passivation-capable bean with the given id.
|
java.lang.Object |
getReference(Bean<?> bean,
java.lang.reflect.Type beanType,
CreationalContext<?> env)
Returns an instance for the given bean.
|
java.util.Set<java.lang.annotation.Annotation> |
getStereotypeDefinition(java.lang.Class<? extends java.lang.annotation.Annotation> stereotype)
Returns the annotations associated with a stereotype
|
boolean |
isInterceptorBinding(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
Tests if an annotation is an enabled interceptor binding type
|
boolean |
isNormalScope(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
Tests if an annotation is an enabled scope type
|
boolean |
isPassivatingScope(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
Tests if an annotation is an enabled scope type
|
boolean |
isQualifier(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
Tests if an annotation is an enabled qualifier type
|
boolean |
isScope(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
Tests if an annotation is an enabled scope type
|
boolean |
isStereotype(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
Tests if an annotation is an enabled stereotype.
|
<X> Bean<? extends X> |
resolve(java.util.Set<Bean<? extends X>> beans)
Returns the bean with the highest precedence deployment type from a set.
|
java.util.List<Decorator<?>> |
resolveDecorators(java.util.Set<java.lang.reflect.Type> types,
java.lang.annotation.Annotation... qualifiers)
Resolves the decorators for a given set of types
|
java.util.List<Interceptor<?>> |
resolveInterceptors(InterceptionType type,
java.lang.annotation.Annotation... bindings)
Resolves the interceptors for a given interceptor type
|
<T> java.util.Set<ObserverMethod<? super T>> |
resolveObserverMethods(T event,
java.lang.annotation.Annotation... qualifiers)
Returns the observers listening for an event
|
void |
validate(InjectionPoint injectionPoint)
Internal callback during creation to get a new injection instance.
|
ExpressionFactory |
wrapExpressionFactory(ExpressionFactory expressionFactory)
Returns the BeanManager's EL resolver.
|
boolean isScope(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
boolean isPassivatingScope(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
boolean isNormalScope(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
boolean isQualifier(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
boolean isInterceptorBinding(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
java.util.Set<java.lang.annotation.Annotation> getInterceptorBindingDefinition(java.lang.Class<? extends java.lang.annotation.Annotation> bindingType)
boolean isStereotype(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
java.util.Set<java.lang.annotation.Annotation> getStereotypeDefinition(java.lang.Class<? extends java.lang.annotation.Annotation> stereotype)
<T> AnnotatedType<T> createAnnotatedType(java.lang.Class<T> type)
<T> InjectionTarget<T> createInjectionTarget(AnnotatedType<T> type)
java.util.Set<Bean<?>> getBeans(java.lang.reflect.Type beanType, java.lang.annotation.Annotation... qualiviers)
type
- the bean's classqualifiers
- array of required @Qualifier annotationsjava.util.Set<Bean<?>> getBeans(java.lang.String name)
name
- the name of the bean to match<X> Bean<? extends X> resolve(java.util.Set<Bean<? extends X>> beans)
beans
- the set of beans to select fromBean<?> getPassivationCapableBean(java.lang.String id)
id
- the basic beanvoid validate(InjectionPoint injectionPoint)
<T> CreationalContext<T> createCreationalContext(Contextual<T> contextual)
java.lang.Object getReference(Bean<?> bean, java.lang.reflect.Type beanType, CreationalContext<?> env)
bean
- the metadata for the beanbeanType
- the expected typeenv
- the creational context environment for the beanjava.lang.Object getInjectableReference(InjectionPoint ij, CreationalContext<?> ctx)
Context getContext(java.lang.Class<? extends java.lang.annotation.Annotation> scopeType)
ELResolver getELResolver()
ExpressionFactory wrapExpressionFactory(ExpressionFactory expressionFactory)
<T> java.util.Set<ObserverMethod<? super T>> resolveObserverMethods(T event, java.lang.annotation.Annotation... qualifiers)
eventType
- event to resolvequalifiers
- the qualifier set for the eventvoid fireEvent(java.lang.Object event, java.lang.annotation.Annotation... qualifiers)
event
- the event to firequalifiers
- the event qualifiersjava.util.List<Interceptor<?>> resolveInterceptors(InterceptionType type, java.lang.annotation.Annotation... bindings)
type
- the main interception typebindings
- qualifying bindingsjava.util.List<Decorator<?>> resolveDecorators(java.util.Set<java.lang.reflect.Type> types, java.lang.annotation.Annotation... qualifiers)
types
- the types to match for the decoratorqualifier
- qualifiers