Package org.apache.webbeans.component
Class ProducerMethodBean<T>
java.lang.Object
org.apache.webbeans.component.BeanAttributesImpl<T>
org.apache.webbeans.component.AbstractOwbBean<T>
org.apache.webbeans.component.AbstractProducerBean<T>
org.apache.webbeans.component.ProducerMethodBean<T>
- All Implemented Interfaces:
jakarta.enterprise.context.spi.Contextual<T>,jakarta.enterprise.inject.spi.Bean<T>,jakarta.enterprise.inject.spi.BeanAttributes<T>,jakarta.enterprise.inject.spi.PassivationCapable,OwbBean<T>
Concrete implementation of the
AbstractOwbBean.
It is defined as producer method component.
- Version:
- $Rev$ $Date$
-
Field Summary
FieldsFields inherited from class org.apache.webbeans.component.AbstractOwbBean
enabled, logger, passivatingId, specializedBean, webBeansContext, webBeansType -
Constructor Summary
ConstructorsConstructorDescriptionProducerMethodBean(InjectionTargetBean<P> ownerComponent, jakarta.enterprise.inject.spi.BeanAttributes<T> beanAttributes, Class<T> returnType, MethodProducerFactory<P> producerFactory) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddToStringInfo(StringBuilder builder) For producer beans we add the info about the owner componentGets the creator method.getId()get the unique Id of the bean.booleanTrue if passivation capable false otherwise.voidsetCreatorMethod(Method creatorMethod) Sets the method.Methods inherited from class org.apache.webbeans.component.AbstractProducerBean
checkNullInstance, checkScopeType, getOwnerComponent, getProducer, getReturnType, isPassivationCapable, providedIdMethods inherited from class org.apache.webbeans.component.AbstractOwbBean
destroy, equals, getBeanClass, getInjectionPoints, getLogger, getWebBeansContext, getWebBeansType, hashCode, isDependent, isEnabled, isSpecializedBean, setEnabled, setSpecializedBean, toStringMethods inherited from class org.apache.webbeans.component.BeanAttributesImpl
getName, getQualifiers, getScope, getStereotypes, getTypes, isAlternativeMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface jakarta.enterprise.inject.spi.BeanAttributes
getName, getQualifiers, getScope, getStereotypes, getTypes, isAlternative
-
Field Details
-
creatorMethod
Creator method of the parent component
-
-
Constructor Details
-
ProducerMethodBean
public ProducerMethodBean(InjectionTargetBean<P> ownerComponent, jakarta.enterprise.inject.spi.BeanAttributes<T> beanAttributes, Class<T> returnType, MethodProducerFactory<P> producerFactory) Creates a new instance.- Parameters:
ownerComponent- parent beanreturnType- producer method return type
-
-
Method Details
-
getCreatorMethod
Gets the creator method.- Returns:
- producer method
-
setCreatorMethod
Sets the method.- Parameters:
creatorMethod- producer method
-
getId
Description copied from class:AbstractOwbBeanget the unique Id of the bean. This will get used as reference on passivation. Gets id of the bean. -
create
Description copied from class:AbstractOwbBean- Specified by:
createin interfacejakarta.enterprise.context.spi.Contextual<T>- Overrides:
createin classAbstractOwbBean<T>
-
isPassivationCapable
public boolean isPassivationCapable()Description copied from interface:OwbBeanTrue if passivation capable false otherwise.- Specified by:
isPassivationCapablein interfaceOwbBean<T>- Overrides:
isPassivationCapablein classAbstractOwbBean<T>- Returns:
- true if this bean is passivation capable
-
addToStringInfo
For producer beans we add the info about the owner component- Overrides:
addToStringInfoin classAbstractOwbBean<T>
-