public class BeanManagerImpl extends Object implements 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. |
public BeanManagerImpl(WebBeansContext webBeansContext)
BeanManager instance.
Called by the system. Do not use outside of the
system.public WebBeansContext getWebBeansContext()
public <T> void putProducerForJavaEeComponent(Class<T> javaEeComponentClass, Producer<T> wrapper)
public <T> Producer<T> getProducerForJavaEeComponent(Class<T> javaEeComponentClass)
public ErrorStack getErrorStack()
public InjectionResolver getInjectionResolver()
public Context getContext(Class<? extends Annotation> scopeType)
getContext in interface BeanManagerscopeType - scope type of the contextContextNotActiveException - if no active contextIllegalStateException - if more than one active contextpublic Instance<Object> createInstance()
createInstance in interface BeanManagerpublic BeanManager addBean(Bean<?> newBean)
inUse status.newBean - new bean instancepublic <T> BeanManager addInternalBean(Bean<T> newBean)
newBean - public void addPassivationInfo(Bean<?> bean) throws DefinitionException
bean - DefinitionException - if the id is not unique.public BeanManager addContext(Context context)
public Context wrapCustomContext(Context context)
SerializableBeanVaultpublic void fireEvent(Object event, Annotation... bindings)
fireEvent in interface BeanManagerpublic Event<Object> getEvent()
getEvent in interface BeanManagerpublic void fireEvent(Object event, boolean containerEvent, Annotation... bindings)
public void fireContextLifecyleEvent(Object payload, Annotation lifecycleQualifier)
public void fireLifecycleEvent(Object event, Annotation... bindings)
fireEvent(Object, java.lang.annotation.Annotation...) but intended for
internal CDI Container lifecycle events. The difference is that those
events must only be delivered to CDI Extensions and not to normal beans.public void fireEvent(Object event, EventMetadataImpl metadata, boolean isLifecycleEvent)
public List<Decorator<?>> resolveDecorators(Set<Type> types, Annotation... bindingTypes)
resolveDecorators in interface BeanManagerpublic List<Decorator<?>> unsafeResolveDecorators(Set<Type> types, Annotation[] bindingTypes)
public List<Interceptor<?>> resolveInterceptors(InterceptionType type, Annotation... interceptorBindings)
resolveInterceptors in interface BeanManagerpublic Reference getReference() throws NamingException
getReference in interface ReferenceableNamingExceptionpublic <T> AnnotatedType<T> createAnnotatedType(Class<T> type)
createAnnotatedType in interface BeanManagerpublic <T> CreationalContextImpl<T> createCreationalContext(Contextual<T> contextual)
createCreationalContext in interface BeanManagerpublic Set<Bean<?>> getBeans(Type beanType, Annotation... bindings)
getBeans in interface BeanManagerpublic Set<Bean<?>> getBeans(String name)
getBeans in interface BeanManagerpublic ELResolver getELResolver()
getELResolver in interface BeanManagerpublic Object getInjectableReference(InjectionPoint injectionPoint, CreationalContext<?> ownerCreationalContext)
getInjectableReference in interface BeanManagerpublic Set<Annotation> getInterceptorBindingDefinition(Class<? extends Annotation> binding)
getInterceptorBindingDefinition in interface BeanManagerpublic Bean<?> getPassivationCapableBean(String id)
getPassivationCapableBean in interface BeanManagerpublic Object getReference(Bean<?> providedBean, Type beanType, CreationalContext<?> creationalContext)
getReference in interface BeanManagerpublic BeanAttributes<?> createBeanAttributes(AnnotatedMember<?> member)
createBeanAttributes in interface BeanManagerpublic InjectionPoint createInjectionPoint(AnnotatedField<?> field)
createInjectionPoint in interface BeanManagerpublic InjectionPoint createInjectionPoint(AnnotatedParameter<?> parameter)
createInjectionPoint in interface BeanManagerpublic <X> ProducerFactory<X> getProducerFactory(AnnotatedField<? super X> field, Bean<X> bean)
getProducerFactory in interface BeanManagerpublic <X> ProducerFactory<X> getProducerFactory(AnnotatedMethod<? super X> method, Bean<X> bean)
getProducerFactory in interface BeanManagerpublic <X> InjectionTargetFactory<X> getInjectionTargetFactory(AnnotatedType<X> type)
getInjectionTargetFactory in interface BeanManagerpublic <T> Bean<T> createBean(BeanAttributes<T> attributes, Class<T> type, InjectionTargetFactory<T> factory)
createBean in interface BeanManagerpublic Set<Annotation> getStereotypeDefinition(Class<? extends Annotation> stereotype)
getStereotypeDefinition in interface BeanManagerpublic boolean isQualifier(Class<? extends Annotation> annotationType)
isQualifier in interface BeanManagerpublic boolean isInterceptorBinding(Class<? extends Annotation> annotationType)
isInterceptorBinding in interface BeanManagerpublic boolean isScope(Class<? extends Annotation> annotationType)
isScope in interface BeanManagerpublic boolean isNormalScope(Class<? extends Annotation> scopeType)
isNormalScope in interface BeanManagerpublic boolean isPassivatingScope(Class<? extends Annotation> annotationType)
isPassivatingScope in interface BeanManagerpublic boolean isStereotype(Class<? extends Annotation> annotationType)
isStereotype in interface BeanManagerpublic boolean areInterceptorBindingsEquivalent(Annotation annotation1, Annotation annotation2)
areInterceptorBindingsEquivalent in interface BeanManagerpublic boolean areQualifiersEquivalent(Annotation annotation1, Annotation annotation2)
areQualifiersEquivalent in interface BeanManagerpublic int getInterceptorBindingHashCode(Annotation annotation)
getInterceptorBindingHashCode in interface BeanManagerpublic int getQualifierHashCode(Annotation annotation)
getQualifierHashCode in interface BeanManagerpublic <T> BeanAttributes<T> createBeanAttributes(AnnotatedType<T> type)
createBeanAttributes in interface BeanManagerpublic <T,X> Bean<T> createBean(BeanAttributes<T> attributes, Class<X> type, ProducerFactory<X> factory)
createBean in interface BeanManagerpublic <T extends Extension> T getExtension(Class<T> type)
getExtension in interface BeanManagerpublic <X> Bean<? extends X> resolve(Set<Bean<? extends X>> beans)
resolve in interface BeanManagerpublic <T> InterceptionFactory<T> createInterceptionFactory(CreationalContext<T> creationalContext, Class<T> clazz)
createInterceptionFactory in interface BeanManagerpublic void validate(InjectionPoint injectionPoint)
validate in interface BeanManagerpublic <T> InjectionTarget<T> createInjectionTarget(AnnotatedType<T> type)
createInjectionTarget in interface BeanManagerpublic <T> Set<ObserverMethod<? super T>> resolveObserverMethods(T event, Annotation... qualifiers)
resolveObserverMethods in interface BeanManagerpublic <T> Set<ObserverMethod<? super T>> resolveObserverMethods(T event, EventMetadataImpl metadata)
public ExpressionFactory wrapExpressionFactory(ExpressionFactory expressionFactory)
wrapExpressionFactory in interface BeanManagerpublic void addAdditionalQualifier(Class<? extends Annotation> qualifier)
public void addAdditionalQualifier(AnnotatedType<? extends Annotation> qualifier)
public void addAdditionalAnnotatedType(Object extension, AnnotatedType<?> annotatedType)
public <T> void addAdditionalAnnotatedType(Object extension, AnnotatedType<T> inAnnotatedType, String id)
public void removeAdditionalAnnotatedType(AnnotatedType<?> annotatedType)
public void removeAdditionalAnnotatedType(AnnotatedType<?> annotatedType, String id)
public List<Class<? extends Annotation>> getAdditionalQualifiers()
public Map<Class<?>,AnnotatedType<? extends Annotation>> getAdditionalAnnotatedTypeQualifiers()
public void addAdditionalScope(ExternalScope additionalScope)
public List<ExternalScope> getAdditionalScopes()
public Collection<AnnotatedType<?>> getAdditionalAnnotatedTypes()
public <T> AnnotatedType<T> getAdditionalAnnotatedType(Class<T> type, String id)
public <T> String getId(Class<T> type, AnnotatedType<T> at)
public <T> Iterable<AnnotatedType<T>> getAnnotatedTypes(Class<T> type)
public void clear()
public void clearCacheProxies()
public boolean isInUse()
public boolean isAfterDeploymentValidationFired()
public void setAfterDeploymentValidationFired(boolean afterDeploymentValidationFired)
public void setAfterBeanDiscoveryStart()
public void setAfterBeanDiscoveryDone()
public boolean isAfterBeanDiscoveryDone()
public boolean isAfterBeanDiscovery()
Copyright © 2008–2017 The Apache Software Foundation. All rights reserved.