public class BeanManagerImpl extends Object implements javax.enterprise.inject.spi.BeanManager, Referenceable
BeanManager contract of the web beans
container.
It is written as thread-safe.
BeanManager| Constructor and Description |
|---|
BeanManagerImpl(WebBeansContext webBeansContext)
Creates a new
BeanManager instance. |
| Modifier and Type | Method and Description |
|---|---|
void |
addAdditionalAnnotatedType(javax.enterprise.inject.spi.AnnotatedType<?> annotatedType) |
void |
addAdditionalQualifier(Class<? extends Annotation> qualifier) |
void |
addAdditionalScope(ExternalScope additionalScope) |
javax.enterprise.inject.spi.BeanManager |
addBean(javax.enterprise.inject.spi.Bean<?> newBean)
Add new bean to the BeanManager.
|
javax.enterprise.inject.spi.BeanManager |
addContext(javax.enterprise.context.spi.Context context) |
void |
addCustomDecoratorClass(Class<?> clazz) |
void |
addCustomInterceptorClass(Class<?> clazz) |
javax.enterprise.inject.spi.BeanManager |
addDecorator(javax.enterprise.inject.spi.Decorator decorator) |
javax.enterprise.inject.spi.BeanManager |
addInterceptor(javax.enterprise.inject.spi.Interceptor interceptor) |
void |
addInterceptorBindingType(Class<? extends Annotation> bindingType,
Annotation... inheritsArray) |
javax.enterprise.inject.spi.BeanManager |
addInternalBean(javax.enterprise.inject.spi.Bean<?> newBean)
This method is reserved for adding 'internal beans'
like e.g. a BeanManagerBean,
|
protected void |
addPassivationInfo(OwbBean<?> bean)
Check if the bean is has a passivation id and add it to the id store.
|
void |
clear() |
void |
clearCacheProxies() |
boolean |
containsCustomDecoratorClass(Class<?> clazz) |
boolean |
containsCustomInterceptorClass(Class<?> clazz) |
<T> javax.enterprise.inject.spi.AnnotatedType<T> |
createAnnotatedType(Class<T> type) |
<T> javax.enterprise.context.spi.CreationalContext<T> |
createCreationalContext(javax.enterprise.context.spi.Contextual<T> contextual) |
<T> javax.enterprise.inject.spi.InjectionTarget<T> |
createInjectionTarget(javax.enterprise.inject.spi.AnnotatedType<T> type) |
void |
fireEvent(Object event,
Annotation... bindings) |
List<javax.enterprise.inject.spi.AnnotatedType<?>> |
getAdditionalAnnotatedTypes() |
List<Class<? extends Annotation>> |
getAdditionalQualifiers() |
List<ExternalScope> |
getAdditionalScopes() |
Set<javax.enterprise.inject.spi.Bean<?>> |
getBeans() |
Set<javax.enterprise.inject.spi.Bean<?>> |
getBeans(String name) |
Set<javax.enterprise.inject.spi.Bean<?>> |
getBeans(Type beanType,
Annotation... bindings) |
Set<javax.enterprise.inject.spi.Bean<?>> |
getComponents() |
javax.enterprise.context.spi.Context |
getContext(Class<? extends Annotation> scopeType)
Gets the active context for the given scope type.
|
Set<javax.enterprise.inject.spi.Decorator<?>> |
getDecorators() |
javax.el.ELResolver |
getELResolver() |
ErrorStack |
getErrorStack() |
Object |
getInjectableReference(javax.enterprise.inject.spi.InjectionPoint injectionPoint,
javax.enterprise.context.spi.CreationalContext<?> ownerCreationalContext) |
InjectionResolver |
getInjectionResolver()
Gets injection resolver.
|
<T> InjectionTargetWrapper<T> |
getInjectionTargetWrapper(Class<T> javaEeComponentClass) |
<T> InjectionTargetWrapper<T> |
getInjectionTargetWrapper(javax.enterprise.context.spi.Contextual<T> contextual) |
Set<Annotation> |
getInterceptorBindingDefinition(Class<? extends Annotation> binding) |
Set<Annotation> |
getInterceptorBindingTypeMetaAnnotations(Class<? extends Annotation> interceptorBindingType) |
List<javax.enterprise.inject.spi.Interceptor<?>> |
getInterceptors() |
NotificationManager |
getNotificationManager()
Return manager notification manager.
|
javax.enterprise.inject.spi.Bean<?> |
getPassivationCapableBean(String id) |
Reference |
getReference() |
Object |
getReference(javax.enterprise.inject.spi.Bean<?> bean,
Type beanType,
javax.enterprise.context.spi.CreationalContext<?> creationalContext) |
Set<Annotation> |
getStereotypeDefinition(Class<? extends Annotation> stereotype) |
boolean |
hasInterceptorBindingType(Class<? extends Annotation> bindingType) |
boolean |
isInterceptorBinding(Class<? extends Annotation> annotationType) |
boolean |
isInUse() |
boolean |
isNormalScope(Class<? extends Annotation> annotationType) |
boolean |
isPassivatingScope(Class<? extends Annotation> annotationType) |
boolean |
isQualifier(Class<? extends Annotation> annotationType) |
boolean |
isScope(Class<? extends Annotation> annotationType) |
boolean |
isScopeTypeNormal(Class<? extends Annotation> scopeType)
The result of this invocation get's cached
|
boolean |
isStereotype(Class<? extends Annotation> annotationType) |
javax.enterprise.inject.spi.BeanManager |
parse(InputStream xmlStream)
Parse the given XML input stream for adding XML defined artifacts.
|
<T> void |
putInjectionTargetWrapper(javax.enterprise.context.spi.Contextual<T> contextual,
InjectionTargetWrapper<T> wrapper) |
<T> void |
putInjectionTargetWrapperForJavaEeComponents(Class<T> javaEeComponentClass,
InjectionTargetWrapper<T> wrapper) |
<X> javax.enterprise.inject.spi.Bean<? extends X> |
resolve(Set<javax.enterprise.inject.spi.Bean<? extends X>> beans) |
List<javax.enterprise.inject.spi.Decorator<?>> |
resolveDecorators(Set<Type> types,
Annotation... bindingTypes) |
List<javax.enterprise.inject.spi.Interceptor<?>> |
resolveInterceptors(javax.enterprise.inject.spi.InterceptionType type,
Annotation... interceptorBindings) |
<T> Set<javax.enterprise.inject.spi.ObserverMethod<? super T>> |
resolveObserverMethods(T event,
Annotation... qualifiers) |
void |
setXMLConfigurator(WebBeansXMLConfigurator xmlConfigurator)
Sets the xml configurator instance.
|
void |
validate(javax.enterprise.inject.spi.InjectionPoint injectionPoint) |
javax.el.ExpressionFactory |
wrapExpressionFactory(javax.el.ExpressionFactory expressionFactory) |
public BeanManagerImpl(WebBeansContext webBeansContext)
BeanManager instance.
Called by the system. Do not use outside of the
system.public <T> void putInjectionTargetWrapper(javax.enterprise.context.spi.Contextual<T> contextual,
InjectionTargetWrapper<T> wrapper)
public <T> InjectionTargetWrapper<T> getInjectionTargetWrapper(javax.enterprise.context.spi.Contextual<T> contextual)
public <T> void putInjectionTargetWrapperForJavaEeComponents(Class<T> javaEeComponentClass, InjectionTargetWrapper<T> wrapper)
public <T> InjectionTargetWrapper<T> getInjectionTargetWrapper(Class<T> javaEeComponentClass)
public ErrorStack getErrorStack()
public NotificationManager getNotificationManager()
public InjectionResolver getInjectionResolver()
public void setXMLConfigurator(WebBeansXMLConfigurator xmlConfigurator)
xmlConfigurator - set xml configurator instance.WebBeansXMLConfiguratorpublic javax.enterprise.context.spi.Context getContext(Class<? extends Annotation> scopeType)
getContext in interface javax.enterprise.inject.spi.BeanManagerscopeType - scope type of the contextjavax.enterprise.context.ContextNotActiveException - if no active contextIllegalStateException - if more than one active contextpublic javax.enterprise.inject.spi.BeanManager addBean(javax.enterprise.inject.spi.Bean<?> newBean)
inUse status.newBean - new bean instancepublic javax.enterprise.inject.spi.BeanManager addInternalBean(javax.enterprise.inject.spi.Bean<?> newBean)
newBean - protected void addPassivationInfo(OwbBean<?> bean) throws DefinitionException
bean - DefinitionException - if the id is not unique.public javax.enterprise.inject.spi.BeanManager addContext(javax.enterprise.context.spi.Context context)
public void addCustomInterceptorClass(Class<?> clazz)
public void addCustomDecoratorClass(Class<?> clazz)
public boolean containsCustomInterceptorClass(Class<?> clazz)
public boolean containsCustomDecoratorClass(Class<?> clazz)
public void addInterceptorBindingType(Class<? extends Annotation> bindingType, Annotation... inheritsArray)
public boolean hasInterceptorBindingType(Class<? extends Annotation> bindingType)
public Set<Annotation> getInterceptorBindingTypeMetaAnnotations(Class<? extends Annotation> interceptorBindingType)
public void fireEvent(Object event, Annotation... bindings)
fireEvent in interface javax.enterprise.inject.spi.BeanManagerpublic Set<javax.enterprise.inject.spi.Bean<?>> getComponents()
public javax.enterprise.inject.spi.BeanManager addDecorator(javax.enterprise.inject.spi.Decorator decorator)
public javax.enterprise.inject.spi.BeanManager addInterceptor(javax.enterprise.inject.spi.Interceptor interceptor)
public List<javax.enterprise.inject.spi.Decorator<?>> resolveDecorators(Set<Type> types, Annotation... bindingTypes)
resolveDecorators in interface javax.enterprise.inject.spi.BeanManagerpublic List<javax.enterprise.inject.spi.Interceptor<?>> resolveInterceptors(javax.enterprise.inject.spi.InterceptionType type, Annotation... interceptorBindings)
resolveInterceptors in interface javax.enterprise.inject.spi.BeanManagerpublic Set<javax.enterprise.inject.spi.Bean<?>> getBeans()
public List<javax.enterprise.inject.spi.Interceptor<?>> getInterceptors()
public Set<javax.enterprise.inject.spi.Decorator<?>> getDecorators()
public Reference getReference() throws NamingException
getReference in interface ReferenceableNamingExceptionpublic javax.enterprise.inject.spi.BeanManager parse(InputStream xmlStream)
xmlStream - beans xml definitionsBeanManager instancepublic <T> javax.enterprise.inject.spi.AnnotatedType<T> createAnnotatedType(Class<T> type)
createAnnotatedType in interface javax.enterprise.inject.spi.BeanManagerpublic <T> javax.enterprise.context.spi.CreationalContext<T> createCreationalContext(javax.enterprise.context.spi.Contextual<T> contextual)
createCreationalContext in interface javax.enterprise.inject.spi.BeanManagerpublic Set<javax.enterprise.inject.spi.Bean<?>> getBeans(Type beanType, Annotation... bindings)
getBeans in interface javax.enterprise.inject.spi.BeanManagerpublic Set<javax.enterprise.inject.spi.Bean<?>> getBeans(String name)
getBeans in interface javax.enterprise.inject.spi.BeanManagerpublic javax.el.ELResolver getELResolver()
getELResolver in interface javax.enterprise.inject.spi.BeanManagerpublic Object getInjectableReference(javax.enterprise.inject.spi.InjectionPoint injectionPoint, javax.enterprise.context.spi.CreationalContext<?> ownerCreationalContext)
getInjectableReference in interface javax.enterprise.inject.spi.BeanManagerpublic Set<Annotation> getInterceptorBindingDefinition(Class<? extends Annotation> binding)
getInterceptorBindingDefinition in interface javax.enterprise.inject.spi.BeanManagerpublic javax.enterprise.inject.spi.Bean<?> getPassivationCapableBean(String id)
getPassivationCapableBean in interface javax.enterprise.inject.spi.BeanManagerpublic Object getReference(javax.enterprise.inject.spi.Bean<?> bean, Type beanType, javax.enterprise.context.spi.CreationalContext<?> creationalContext)
getReference in interface javax.enterprise.inject.spi.BeanManagerpublic Set<Annotation> getStereotypeDefinition(Class<? extends Annotation> stereotype)
getStereotypeDefinition in interface javax.enterprise.inject.spi.BeanManagerpublic boolean isQualifier(Class<? extends Annotation> annotationType)
isQualifier in interface javax.enterprise.inject.spi.BeanManagerpublic boolean isInterceptorBinding(Class<? extends Annotation> annotationType)
isInterceptorBinding in interface javax.enterprise.inject.spi.BeanManagerpublic boolean isScope(Class<? extends Annotation> annotationType)
isScope in interface javax.enterprise.inject.spi.BeanManagerpublic boolean isNormalScope(Class<? extends Annotation> annotationType)
isNormalScope in interface javax.enterprise.inject.spi.BeanManagerpublic boolean isPassivatingScope(Class<? extends Annotation> annotationType)
isPassivatingScope in interface javax.enterprise.inject.spi.BeanManagerpublic boolean isStereotype(Class<? extends Annotation> annotationType)
isStereotype in interface javax.enterprise.inject.spi.BeanManagerpublic <X> javax.enterprise.inject.spi.Bean<? extends X> resolve(Set<javax.enterprise.inject.spi.Bean<? extends X>> beans)
resolve in interface javax.enterprise.inject.spi.BeanManagerpublic void validate(javax.enterprise.inject.spi.InjectionPoint injectionPoint)
validate in interface javax.enterprise.inject.spi.BeanManagerpublic <T> javax.enterprise.inject.spi.InjectionTarget<T> createInjectionTarget(javax.enterprise.inject.spi.AnnotatedType<T> type)
createInjectionTarget in interface javax.enterprise.inject.spi.BeanManagerpublic <T> Set<javax.enterprise.inject.spi.ObserverMethod<? super T>> resolveObserverMethods(T event, Annotation... qualifiers)
resolveObserverMethods in interface javax.enterprise.inject.spi.BeanManagerpublic javax.el.ExpressionFactory wrapExpressionFactory(javax.el.ExpressionFactory expressionFactory)
wrapExpressionFactory in interface javax.enterprise.inject.spi.BeanManagerpublic void addAdditionalQualifier(Class<? extends Annotation> qualifier)
public void addAdditionalAnnotatedType(javax.enterprise.inject.spi.AnnotatedType<?> annotatedType)
public List<Class<? extends Annotation>> getAdditionalQualifiers()
public void addAdditionalScope(ExternalScope additionalScope)
public List<ExternalScope> getAdditionalScopes()
public List<javax.enterprise.inject.spi.AnnotatedType<?>> getAdditionalAnnotatedTypes()
public void clear()
public void clearCacheProxies()
public boolean isInUse()
public boolean isScopeTypeNormal(Class<? extends Annotation> scopeType)
scopeType - true if the given scopeType represents a
NormalScoped beanisScopeTypeNormalCacheCopyright © 2008-2013 The Apache Software Foundation. All Rights Reserved.