|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.webbeans.component.AbstractOwbBean<T>
public abstract class AbstractOwbBean<T>
Abstract implementation of the OwbBean contract.
Bean| Field Summary | |
|---|---|
protected Set<Type> |
apiTypes
Api types of the bean |
protected boolean |
enabled
This bean is enabled or disabled |
protected Set<Annotation> |
implQualifiers
Qualifiers of the bean |
protected Annotation |
implScopeType
Scope type of the bean |
protected Set<javax.enterprise.inject.spi.InjectionPoint> |
injectionPoints
Beans injection points |
protected String |
name
Name of the bean |
protected boolean |
nullable
The bean allows nullable object |
protected String |
passivatingId
This string will be used for passivating the Bean. |
protected Class<T> |
returnType
Return type of the bean |
protected Class<? extends Annotation> |
scopeClass
Cached scope type of the bean |
protected boolean |
serializable
The bean is serializable or not |
protected boolean |
specializedBean
This bean is specialized or not |
protected Set<Class<? extends Annotation>> |
stereoTypeClasses
this is only for public access and will be built from stereoTypes on demand |
protected Set<Annotation> |
stereoTypes
Stereotypes of the bean |
protected WebBeansType |
webBeansType
Web Beans type |
| Constructor Summary | |
|---|---|
protected |
AbstractOwbBean(WebBeansType webBeansType,
Class<T> returnType,
WebBeansContext webBeansContext)
Constructor definiton. |
protected |
AbstractOwbBean(WebBeansType webBeanType,
WebBeansContext webBeansContext)
Creates a new instance. |
| Method Summary | |
|---|---|
void |
addApiType(Class<?> apiType)
Add new api type. |
void |
addInjectionPoint(javax.enterprise.inject.spi.InjectionPoint injectionPoint)
Adds new injection point. |
void |
addQualifier(Annotation qualifier)
Add new qualifier. |
void |
addStereoType(Annotation stereoType)
Add new stereotype. |
T |
create(javax.enterprise.context.spi.CreationalContext<T> creationalContext)
|
protected abstract T |
createInstance(javax.enterprise.context.spi.CreationalContext<T> creationalContext)
Creates the instance of the bean that has a specific implementation type. |
T |
createNewInstance(javax.enterprise.context.spi.CreationalContext<T> creationalContext)
Create an instance. |
void |
destroy(T instance,
javax.enterprise.context.spi.CreationalContext<T> creationalContext)
|
void |
destroyCreatedInstance(T instance,
javax.enterprise.context.spi.CreationalContext<T> creationalContext)
Destroys instance. |
protected void |
destroyInstance(T instance,
javax.enterprise.context.spi.CreationalContext<T> creationalContext)
Destroy the instance of the bean. |
boolean |
equals(Object obj)
|
Class<?> |
getBeanClass()
Get return types of the bean. |
String |
getId()
get the unique Id of the bean. |
Set<Annotation> |
getImplQualifiers()
Get qualifiers. |
Annotation |
getImplScopeType()
Get scope type. |
List<javax.enterprise.inject.spi.InjectionPoint> |
getInjectionPoint(Member member)
Gets injection points for given member. |
Set<javax.enterprise.inject.spi.InjectionPoint> |
getInjectionPoints()
|
protected WebBeansLogger |
getLogger()
The Logger should really only be used to log errors! |
protected BeanManagerImpl |
getManager()
Gets manager instance |
String |
getName()
Name of the bean. |
Set<Annotation> |
getOwbStereotypes()
Gets the stereotypes. |
Set<Annotation> |
getQualifiers()
|
Class<T> |
getReturnType()
Gets type of the producer method. |
Class<? extends Annotation> |
getScope()
|
Set<Class<? extends Annotation>> |
getStereotypes()
|
Set<Type> |
getTypes()
|
WebBeansContext |
getWebBeansContext()
Get the web beans context this bean is associated with |
WebBeansType |
getWebBeansType()
Get web bean type of the bean. |
int |
hashCode()
|
boolean |
isAlternative()
|
boolean |
isDependent()
This determines if this bean is really a dependent bean, and as such always creats a freshl instance for each InjectionPoint. |
boolean |
isEnabled()
Bean is enabled or not. |
boolean |
isNullable()
|
boolean |
isPassivationCapable()
True if passivation capable false otherwise. |
boolean |
isSerializable()
Returns true if bean is capable of serializable, false otherwise. |
boolean |
isSpecializedBean()
Returns true if bean is a specialized bean, false otherwise. |
void |
setEnabled(boolean enabled)
Set enableed flag. |
void |
setImplScopeType(Annotation scopeType)
Set scope type. |
void |
setName(String name)
Set name. |
void |
setNullable(boolean nullable)
Set nullable flag. |
void |
setSerializable(boolean serializable)
Sets serializable flag. |
void |
setSpecializedBean(boolean specialized)
Set specialized flag. |
String |
toString()
|
void |
validatePassivationDependencies()
If bean is passivation capable, it validate all of its dependencies. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected String name
protected Annotation implScopeType
protected Class<? extends Annotation> scopeClass
protected Set<Annotation> implQualifiers
protected Set<Type> apiTypes
protected WebBeansType webBeansType
protected Class<T> returnType
protected Set<Annotation> stereoTypes
protected Set<Class<? extends Annotation>> stereoTypeClasses
stereoTypes on demand
protected boolean specializedBean
protected boolean enabled
protected boolean serializable
protected boolean nullable
protected Set<javax.enterprise.inject.spi.InjectionPoint> injectionPoints
protected String passivatingId
getId()| Constructor Detail |
|---|
protected AbstractOwbBean(WebBeansType webBeansType,
Class<T> returnType,
WebBeansContext webBeansContext)
returnType - of the beanwebBeansContext - webBeansType - web beans type
protected AbstractOwbBean(WebBeansType webBeanType,
WebBeansContext webBeansContext)
webBeanType - beans typewebBeansContext - | Method Detail |
|---|
public WebBeansContext getWebBeansContext()
getWebBeansContext in interface OwbBean<T>protected BeanManagerImpl getManager()
public T create(javax.enterprise.context.spi.CreationalContext<T> creationalContext)
create in interface javax.enterprise.context.spi.Contextual<T>protected abstract T createInstance(javax.enterprise.context.spi.CreationalContext<T> creationalContext)
creationalContext - the contextual instance shall be created in
public T createNewInstance(javax.enterprise.context.spi.CreationalContext<T> creationalContext)
createNewInstance in interface OwbBean<T>creationalContext - creaitonal context
public void destroy(T instance,
javax.enterprise.context.spi.CreationalContext<T> creationalContext)
destroy in interface javax.enterprise.context.spi.Contextual<T>
protected void destroyInstance(T instance,
javax.enterprise.context.spi.CreationalContext<T> creationalContext)
instance - instance of the bean that is being destroyedcreationalContext - the contextual instance has been created in
public void destroyCreatedInstance(T instance,
javax.enterprise.context.spi.CreationalContext<T> creationalContext)
destroyCreatedInstance in interface OwbBean<T>instance - instancecreationalContext - creationalpublic String getId()
getId in interface OwbBean<T>public boolean isPassivationCapable()
OwbBean
isPassivationCapable in interface OwbBean<T>public Class<?> getBeanClass()
getBeanClass in interface javax.enterprise.inject.spi.Bean<T>public Annotation getImplScopeType()
getImplScopeType in interface OwbBean<T>public void setImplScopeType(Annotation scopeType)
setImplScopeType in interface OwbBean<T>scopeType - scope typepublic String getName()
getName in interface javax.enterprise.inject.spi.Bean<T>public WebBeansType getWebBeansType()
getWebBeansType in interface OwbBean<T>WebBeansTypepublic void addStereoType(Annotation stereoType)
addStereoType in interface OwbBean<T>stereoType - new stereotype annotationpublic void addApiType(Class<?> apiType)
addApiType in interface OwbBean<T>apiType - new api typepublic Set<Annotation> getImplQualifiers()
getImplQualifiers in interface OwbBean<T>public Set<Annotation> getOwbStereotypes()
getOwbStereotypes in interface OwbBean<T>public void addQualifier(Annotation qualifier)
addQualifier in interface OwbBean<T>qualifier - new qualifierpublic void setName(String name)
setName in interface OwbBean<T>name - new namepublic Set<Annotation> getQualifiers()
getQualifiers in interface javax.enterprise.inject.spi.Bean<T>public Class<? extends Annotation> getScope()
getScope in interface javax.enterprise.inject.spi.Bean<T>public Set<Type> getTypes()
getTypes in interface javax.enterprise.inject.spi.Bean<T>public Class<T> getReturnType()
getReturnType in interface OwbBean<T>public void setNullable(boolean nullable)
setNullable in interface OwbBean<T>nullable - flagpublic void setSerializable(boolean serializable)
setSerializable in interface OwbBean<T>serializable - flagpublic boolean isNullable()
isNullable in interface javax.enterprise.inject.spi.Bean<T>public boolean isSerializable()
isSerializable in interface OwbBean<T>public void addInjectionPoint(javax.enterprise.inject.spi.InjectionPoint injectionPoint)
addInjectionPoint in interface OwbBean<T>injectionPoint - injection pointpublic Set<javax.enterprise.inject.spi.InjectionPoint> getInjectionPoints()
getInjectionPoints in interface javax.enterprise.inject.spi.Bean<T>public void setSpecializedBean(boolean specialized)
setSpecializedBean in interface OwbBean<T>specialized - flagpublic void setEnabled(boolean enabled)
setEnabled in interface OwbBean<T>enabled - flagpublic boolean isSpecializedBean()
isSpecializedBean in interface OwbBean<T>public List<javax.enterprise.inject.spi.InjectionPoint> getInjectionPoint(Member member)
For example, if member is field, it gets all injected field's injection points of bean.
getInjectionPoint in interface OwbBean<T>member - java member
public Set<Class<? extends Annotation>> getStereotypes()
getStereotypes in interface javax.enterprise.inject.spi.Bean<T>public boolean isAlternative()
isAlternative in interface javax.enterprise.inject.spi.Bean<T>public boolean isEnabled()
isEnabled in interface OwbBean<T>public String toString()
toString in class Objectprotected WebBeansLogger getLogger()
public boolean isDependent()
OwbBean
isDependent in interface OwbBean<T>true if this is a dependent beanpublic void validatePassivationDependencies()
OwbBean
validatePassivationDependencies in interface OwbBean<T>public int hashCode()
hashCode in class Objectpublic boolean equals(Object obj)
equals in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||