public class ProducerMethodBean<T> extends AbstractProducerBean<T>
AbstractOwbBean.
It is defined as producer method component.
| Modifier and Type | Field and Description |
|---|---|
protected Method |
creatorMethod
Creator method of the parent component
|
protected Method |
disposalMethod
Disposal method
|
ownerComponentapiTypes, enabled, implQualifiers, injectionPoints, logger, name, nullable, passivatingId, returnType, scopeClass, serializable, specializedBean, stereoTypeClasses, stereoTypes, webBeansContext, webBeansType| Constructor and Description |
|---|
ProducerMethodBean(InjectionTargetBean<?> parent,
Class<T> returnType)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkNullInstance(Object instance)
Check null control.
|
protected void |
checkScopeType()
Check passivation check.
|
protected T |
createDefaultInstance(javax.enterprise.context.spi.CreationalContext<T> creationalContext)
Default producer method creation.
|
protected T |
createInstance(javax.enterprise.context.spi.CreationalContext<T> creationalContext)
Creates the instance of the bean that has a specific implementation
type.
|
protected void |
destroyInstance(T instance,
javax.enterprise.context.spi.CreationalContext<T> creationalContext)
Destroy the instance of the bean.
|
void |
dispose(T instance,
javax.enterprise.context.spi.CreationalContext<T> creationalContext) |
protected void |
disposeDefault(T instance,
javax.enterprise.context.spi.CreationalContext<T> creationalContext)
Default dispose method used.
|
Method |
getCreatorMethod()
Gets the creator method.
|
String |
getId()
get the unique Id of the bean.
|
boolean |
isPassivationCapable()
True if passivation capable false otherwise.
|
void |
setCreatorMethod(Method creatorMethod)
Sets the method.
|
void |
setDisposalMethod(Method disposalMethod)
Sets the disposal method.
|
destroyBean, equals, getParent, getParentInstance, getParentInstanceFromContext, hashCode, isPassivationCapable, validatePassivationDependenciesaddApiType, addInjectionPoint, addQualifier, addStereoType, create, createNewInstance, destroy, destroyCreatedInstance, getBeanClass, getInjectionPoint, getInjectionPoints, getLogger, getManager, getName, getOwbStereotypes, getQualifiers, getReturnType, getScope, getStereotypes, getTypes, getWebBeansContext, getWebBeansType, isAlternative, isDependent, isEnabled, isNullable, isSerializable, isSpecializedBean, setEnabled, setImplScopeType, setName, setNullable, setSerializable, setSpecializedBean, toStringprotected Method creatorMethod
protected Method disposalMethod
public ProducerMethodBean(InjectionTargetBean<?> parent, Class<T> returnType)
parent - parent beanreturnType - producer method return typepublic Method getCreatorMethod()
public void setCreatorMethod(Method creatorMethod)
creatorMethod - producer methodpublic void setDisposalMethod(Method disposalMethod)
disposalMethod - disposal method of this producer method componentpublic String getId()
AbstractOwbBeanprotected T createInstance(javax.enterprise.context.spi.CreationalContext<T> creationalContext)
createInstance in class AbstractProducerBean<T>creationalContext - the contextual instance shall be created inprotected T createDefaultInstance(javax.enterprise.context.spi.CreationalContext<T> creationalContext)
creationalContext - creational contextprotected void destroyInstance(T instance, javax.enterprise.context.spi.CreationalContext<T> creationalContext)
destroyInstance in class AbstractOwbBean<T>instance - instance of the bean that is being destroyedcreationalContext - the contextual instance has been created inpublic void dispose(T instance, javax.enterprise.context.spi.CreationalContext<T> creationalContext)
dispose in interface IBeanHasParent<T>dispose in class AbstractProducerBean<T>protected void disposeDefault(T instance, javax.enterprise.context.spi.CreationalContext<T> creationalContext)
instance - bean instanceprotected void checkNullInstance(Object instance)
instance - bean instanceprotected void checkScopeType()
public boolean isPassivationCapable()
OwbBeanisPassivationCapable in interface OwbBean<T>isPassivationCapable in class AbstractOwbBean<T>Copyright © 2008-2013 The Apache Software Foundation. All Rights Reserved.