public abstract class CdiBean<T> extends Object implements javax.enterprise.inject.spi.Bean<T>, javax.enterprise.inject.spi.PassivationCapable
Bean wrappers.| Modifier and Type | Field and Description |
|---|---|
protected javax.enterprise.inject.spi.BeanManager |
beanManager |
| Constructor and Description |
|---|
CdiBean(Set<Annotation> qualifiers,
Class<T> beanClass,
javax.enterprise.inject.spi.BeanManager beanManager)
Creates a new
CdiBean. |
CdiBean(Set<Annotation> qualifiers,
Set<Type> types,
Class<T> beanClass,
javax.enterprise.inject.spi.BeanManager beanManager)
Creates a new
CdiBean. |
| Modifier and Type | Method and Description |
|---|---|
void |
destroy(T instance,
javax.enterprise.context.spi.CreationalContext<T> creationalContext) |
Class<?> |
getBeanClass() |
protected <S> S |
getDependencyInstance(javax.enterprise.inject.spi.Bean<S> bean,
Type type)
Returns an instance of the given
Bean from the container. |
String |
getId() |
Set<javax.enterprise.inject.spi.InjectionPoint> |
getInjectionPoints() |
String |
getName() |
Set<Annotation> |
getQualifiers() |
Class<? extends Annotation> |
getScope() |
Set<Class<? extends Annotation>> |
getStereotypes() |
Set<Type> |
getTypes() |
void |
initialize()
Forces the initialization of bean target.
|
boolean |
isAlternative() |
boolean |
isNullable() |
String |
toString() |
public CdiBean(Set<Annotation> qualifiers, Class<T> beanClass, javax.enterprise.inject.spi.BeanManager beanManager)
CdiBean.qualifiers - must not be null.beanClass - has to be an interface must not be null.beanManager - the CDI BeanManager, must not be null.public CdiBean(Set<Annotation> qualifiers, Set<Type> types, Class<T> beanClass, javax.enterprise.inject.spi.BeanManager beanManager)
CdiBean.qualifiers - must not be null.types - additional bean types, must not be null.beanClass - must not be null.beanManager - the CDI BeanManager, must not be null.public Set<Type> getTypes()
getTypes in interface javax.enterprise.inject.spi.Bean<T>protected <S> S getDependencyInstance(javax.enterprise.inject.spi.Bean<S> bean,
Type type)
Bean from the container.S - the actual class type of the Bean.bean - the Bean defining the instance to create.type - the expected component type of the instance created from the Bean.Bean.BeanManager.getReference(Bean, Type, CreationalContext),
Bean,
Typepublic final void initialize()
public void destroy(T instance, javax.enterprise.context.spi.CreationalContext<T> creationalContext)
destroy in interface javax.enterprise.context.spi.Contextual<T>public Set<Annotation> getQualifiers()
getQualifiers in interface javax.enterprise.inject.spi.Bean<T>public String getName()
getName in interface javax.enterprise.inject.spi.Bean<T>public Set<Class<? extends Annotation>> getStereotypes()
getStereotypes in interface javax.enterprise.inject.spi.Bean<T>public Class<?> getBeanClass()
getBeanClass in interface javax.enterprise.inject.spi.Bean<T>public boolean isAlternative()
isAlternative in interface javax.enterprise.inject.spi.Bean<T>public boolean isNullable()
isNullable in interface javax.enterprise.inject.spi.Bean<T>public Set<javax.enterprise.inject.spi.InjectionPoint> getInjectionPoints()
getInjectionPoints in interface javax.enterprise.inject.spi.Bean<T>public Class<? extends Annotation> getScope()
getScope in interface javax.enterprise.inject.spi.Bean<T>public String getId()
getId in interface javax.enterprise.inject.spi.PassivationCapableCopyright © 2011-2016–2016 Pivotal Software, Inc.. All rights reserved.