Package org.jboss.weld.bean.builtin
Class ContextBean<T extends Context>
- java.lang.Object
-
- org.jboss.weld.util.bean.ForwardingBeanAttributes<T>
-
- org.jboss.weld.bean.CommonBean<T>
-
- org.jboss.weld.bean.RIBean<T>
-
- org.jboss.weld.bean.builtin.AbstractBuiltInBean<T>
-
- org.jboss.weld.bean.builtin.ContextBean<T>
-
- All Implemented Interfaces:
Contextual<T>,Bean<T>,BeanAttributes<T>,PassivationCapable,WeldBean<T>
public class ContextBean<T extends Context> extends AbstractBuiltInBean<T>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.jboss.weld.bean.builtin.AbstractBuiltInBean
AbstractBuiltInBean.BuiltInBeanAttributes<T>
-
-
Field Summary
-
Fields inherited from class org.jboss.weld.bean.RIBean
beanManager
-
-
Constructor Summary
Constructors Constructor Description ContextBean(ContextHolder<T> contextHolder, BeanManagerImpl beanManager)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Tcreate(CreationalContext<T> creationalContext)Create a new instance of the contextual type.Set<Annotation>getQualifiers()Obtains the qualifiers of the bean.Set<Type>getTypes()Obtains the bean types of the bean.static <T extends Context>
ContextBean<T>of(ContextHolder<T> context, BeanManagerImpl beanManager)-
Methods inherited from class org.jboss.weld.bean.builtin.AbstractBuiltInBean
cleanupAfterBoot, getInjectionPoints, getType, initializeAfterBeanDiscovery, internalInitialize, isDependentContextOptimizationAllowed, isPassivationCapableBean, isPassivationCapableDependency, isProxyable, isProxyRequired, preInitialize
-
Methods inherited from class org.jboss.weld.bean.RIBean
destroy, getBeanClass, getBeanManager, getContextualInstanceStrategy, getQualifierInstances, initialize, isDependent, isNormalScoped, setAttributes
-
Methods inherited from class org.jboss.weld.bean.CommonBean
attributes, equals, getId, getIdentifier, hashCode, isNullable, toString, unwrap
-
Methods inherited from class org.jboss.weld.util.bean.ForwardingBeanAttributes
getName, getScope, getStereotypes, isAlternative
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface javax.enterprise.inject.spi.BeanAttributes
getName, getScope, getStereotypes, isAlternative
-
Methods inherited from interface javax.enterprise.inject.spi.PassivationCapable
getId
-
Methods inherited from interface org.jboss.weld.bean.WeldBean
getPriority
-
-
-
-
Constructor Detail
-
ContextBean
public ContextBean(ContextHolder<T> contextHolder, BeanManagerImpl beanManager)
-
-
Method Detail
-
of
public static <T extends Context> ContextBean<T> of(ContextHolder<T> context, BeanManagerImpl beanManager)
-
getTypes
public Set<Type> getTypes()
Description copied from interface:BeanAttributesObtains the bean types of the bean.- Specified by:
getTypesin interfaceBeanAttributes<T extends Context>- Overrides:
getTypesin classForwardingBeanAttributes<T extends Context>- Returns:
- the bean types
-
create
public T create(CreationalContext<T> creationalContext)
Description copied from interface:ContextualCreate a new instance of the contextual type. Instances should use the givenCreationalContextwhen obtaining contextual references to inject, in order to ensure that any dependent objects are associated with the contextual instance that is being created. An implementation may callCreationalContext.push(Object)between instantiation and injection to help the container minimize the use of client proxy objects.- Parameters:
creationalContext- the context in which this instance is being created- Returns:
- the contextual instance
-
getQualifiers
public Set<Annotation> getQualifiers()
Description copied from interface:BeanAttributesObtains the qualifiers of the bean.- Specified by:
getQualifiersin interfaceBeanAttributes<T extends Context>- Overrides:
getQualifiersin classForwardingBeanAttributes<T extends Context>- Returns:
- the qualifiers
-
-