|
||||||||||
| 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 java.util.Set<java.lang.reflect.Type> |
apiTypes
Api types of the bean |
protected boolean |
enabled
This bean is enabled or disabled |
protected java.util.Set<java.lang.annotation.Annotation> |
implQualifiers
Qualifiers of the bean |
protected java.lang.annotation.Annotation |
implScopeType
Scope type of the bean |
protected java.util.Set<javax.enterprise.inject.spi.InjectionPoint> |
injectionPoints
Beans injection points |
protected java.lang.String |
name
Name of the bean |
protected boolean |
nullable
The bean allows nullable object |
protected java.lang.String |
passivatingId
This string will be used for passivating the Bean. |
protected java.lang.Class<T> |
returnType
Return type of the bean |
protected java.lang.Class<? extends java.lang.annotation.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 java.util.Set<java.lang.Class<? extends java.lang.annotation.Annotation>> |
stereoTypeClasses
this is only for public access and will be built from stereoTypes on demand |
protected java.util.Set<java.lang.annotation.Annotation> |
stereoTypes
Stereotypes of the bean |
protected WebBeansType |
webBeansType
Web Beans type |
| Constructor Summary | |
|---|---|
protected |
AbstractOwbBean(WebBeansType webBeansType,
java.lang.Class<T> returnType,
WebBeansContext webBeansContext)
Constructor definiton. |
protected |
AbstractOwbBean(WebBeansType webBeanType,
WebBeansContext webBeansContext)
Creates a new instance. |
| Method Summary | |
|---|---|
void |
addApiType(java.lang.Class<?> apiType)
Add new api type. |
void |
addInjectionPoint(javax.enterprise.inject.spi.InjectionPoint injectionPoint)
Adds new injection point. |
void |
addQualifier(java.lang.annotation.Annotation qualifier)
Add new qualifier. |
void |
addStereoType(java.lang.annotation.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. |
java.lang.Class<?> |
getBeanClass()
Get return types of the bean. |
java.lang.String |
getId()
get the unique Id of the bean. |
java.util.Set<java.lang.annotation.Annotation> |
getImplQualifiers()
Get qualifiers. |
java.lang.annotation.Annotation |
getImplScopeType()
Get scope type. |
java.util.List<javax.enterprise.inject.spi.InjectionPoint> |
getInjectionPoint(java.lang.reflect.Member member)
Gets injection points for given member. |
java.util.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 |
java.lang.String |
getName()
Name of the bean. |
java.util.Set<java.lang.annotation.Annotation> |
getOwbStereotypes()
Gets the stereotypes. |
java.util.Set<java.lang.annotation.Annotation> |
getQualifiers()
|
java.lang.Class<T> |
getReturnType()
Gets type of the producer method. |
java.lang.Class<? extends java.lang.annotation.Annotation> |
getScope()
|
java.util.Set<java.lang.Class<? extends java.lang.annotation.Annotation>> |
getStereotypes()
|
java.util.Set<java.lang.reflect.Type> |
getTypes()
|
WebBeansContext |
getWebBeansContext()
Get the web beans context this bean is associated with |
WebBeansType |
getWebBeansType()
Get web bean type of the bean. |
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(java.lang.annotation.Annotation scopeType)
Set scope type. |
void |
setName(java.lang.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. |
java.lang.String |
toString()
|
void |
validatePassivationDependencies()
If bean is passivation capable, it validate all of its dependencies. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected java.lang.String name
protected java.lang.annotation.Annotation implScopeType
protected java.lang.Class<? extends java.lang.annotation.Annotation> scopeClass
protected java.util.Set<java.lang.annotation.Annotation> implQualifiers
protected java.util.Set<java.lang.reflect.Type> apiTypes
protected WebBeansType webBeansType
protected java.lang.Class<T> returnType
protected java.util.Set<java.lang.annotation.Annotation> stereoTypes
protected java.util.Set<java.lang.Class<? extends java.lang.annotation.Annotation>> stereoTypeClasses
stereoTypes on demand
protected boolean specializedBean
protected boolean enabled
protected boolean serializable
protected boolean nullable
protected java.util.Set<javax.enterprise.inject.spi.InjectionPoint> injectionPoints
protected java.lang.String passivatingId
getId()| Constructor Detail |
|---|
protected AbstractOwbBean(WebBeansType webBeansType,
java.lang.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 java.lang.String getId()
getId in interface OwbBean<T>public boolean isPassivationCapable()
OwbBean
isPassivationCapable in interface OwbBean<T>public java.lang.Class<?> getBeanClass()
getBeanClass in interface javax.enterprise.inject.spi.Bean<T>public java.lang.annotation.Annotation getImplScopeType()
getImplScopeType in interface OwbBean<T>public void setImplScopeType(java.lang.annotation.Annotation scopeType)
setImplScopeType in interface OwbBean<T>scopeType - scope typepublic java.lang.String getName()
getName in interface javax.enterprise.inject.spi.Bean<T>public WebBeansType getWebBeansType()
getWebBeansType in interface OwbBean<T>WebBeansTypepublic void addStereoType(java.lang.annotation.Annotation stereoType)
addStereoType in interface OwbBean<T>stereoType - new stereotype annotationpublic void addApiType(java.lang.Class<?> apiType)
addApiType in interface OwbBean<T>apiType - new api typepublic java.util.Set<java.lang.annotation.Annotation> getImplQualifiers()
getImplQualifiers in interface OwbBean<T>public java.util.Set<java.lang.annotation.Annotation> getOwbStereotypes()
getOwbStereotypes in interface OwbBean<T>public void addQualifier(java.lang.annotation.Annotation qualifier)
addQualifier in interface OwbBean<T>qualifier - new qualifierpublic void setName(java.lang.String name)
setName in interface OwbBean<T>name - new namepublic java.util.Set<java.lang.annotation.Annotation> getQualifiers()
getQualifiers in interface javax.enterprise.inject.spi.Bean<T>public java.lang.Class<? extends java.lang.annotation.Annotation> getScope()
getScope in interface javax.enterprise.inject.spi.Bean<T>public java.util.Set<java.lang.reflect.Type> getTypes()
getTypes in interface javax.enterprise.inject.spi.Bean<T>public java.lang.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 java.util.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 java.util.List<javax.enterprise.inject.spi.InjectionPoint> getInjectionPoint(java.lang.reflect.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 java.util.Set<java.lang.Class<? extends java.lang.annotation.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 java.lang.String toString()
toString in class java.lang.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>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||