public abstract class AbstractBean<T> extends java.lang.Object implements Bean<T>, ObjectProxy, AnnotatedBean
Constructor and Description |
---|
AbstractBean(InjectManager beanManager) |
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
calculatePassivationId() |
abstract T |
create(CreationalContext<T> creationalContext)
Creates a new instance for the Contextual's type.
|
java.lang.Object |
createObject(java.util.Hashtable env)
Creates the object from the proxy.
|
void |
destroy(T instance,
CreationalContext<T> env)
Destroys an instance for the Contextual's type.
|
Annotated |
getAnnotated() |
AnnotatedType<T> |
getAnnotatedType() |
java.lang.Class<?> |
getBeanClass()
Returns the bean class.
|
InjectManager |
getBeanManager() |
java.lang.String |
getId() |
java.util.Set<InjectionPoint> |
getInjectionPoints()
Returns the set of injection points, for validation.
|
InjectionTarget<T> |
getInjectionTarget() |
java.lang.Class<?> |
getJavaClass() |
java.lang.String |
getName()
Returns the bean's name or null if the bean does not have a primary name.
|
java.util.Set<java.lang.annotation.Annotation> |
getQualifiers()
Returns the bean's qualifier annotations.
|
java.lang.Class<? extends java.lang.annotation.Annotation> |
getScope()
Returns the bean's scope type.
|
java.util.Set<java.lang.Class<? extends java.lang.annotation.Annotation>> |
getStereotypes()
Returns the stereotypes that the bean uses for priority
|
abstract java.util.Set<java.lang.reflect.Type> |
getTypes()
Returns the types that the bean exports for bindings.
|
void |
introspect() |
boolean |
isAlternative()
True for a disabled alternative.
|
boolean |
isNullable()
Returns true if the bean can be null
|
boolean |
isPassivationCapable() |
java.lang.String |
toDisplayString() |
protected java.lang.String |
toDisplayStringImpl() |
java.lang.String |
toString() |
public AbstractBean(InjectManager beanManager)
public InjectManager getBeanManager()
public java.lang.String getId()
public Annotated getAnnotated()
getAnnotated
in interface AnnotatedBean
public AnnotatedType<T> getAnnotatedType()
public InjectionTarget<T> getInjectionTarget()
public void introspect()
public abstract T create(CreationalContext<T> creationalContext)
Contextual
create
in interface Contextual<T>
creationalContext
- the creation context used to support circular
references.public void destroy(T instance, CreationalContext<T> env)
Contextual
@Disposal
method
@PreDestroy
methods
destroy
in interface Contextual<T>
instance
- the instance to destroypublic abstract java.util.Set<java.lang.reflect.Type> getTypes()
Bean
public java.lang.Class<?> getBeanClass()
Bean
getBeanClass
in interface Bean<T>
public java.lang.Class<?> getJavaClass()
public java.util.Set<java.lang.annotation.Annotation> getQualifiers()
Bean
getQualifiers
in interface Bean<T>
public java.util.Set<java.lang.Class<? extends java.lang.annotation.Annotation>> getStereotypes()
Bean
getStereotypes
in interface Bean<T>
public java.util.Set<InjectionPoint> getInjectionPoints()
Bean
getInjectionPoints
in interface Bean<T>
public java.lang.String getName()
Bean
public boolean isAlternative()
Bean
isAlternative
in interface Bean<T>
public boolean isNullable()
Bean
isNullable
in interface Bean<T>
public boolean isPassivationCapable()
public java.lang.Class<? extends java.lang.annotation.Annotation> getScope()
Bean
protected java.lang.String calculatePassivationId()
public java.lang.Object createObject(java.util.Hashtable env)
createObject
in interface ObjectProxy
public java.lang.String toDisplayString()
protected java.lang.String toDisplayStringImpl()
public java.lang.String toString()
toString
in class java.lang.Object