Package org.apache.webbeans.component
Class ProducerFieldBean<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.ProducerFieldBean<T>
-
- Type Parameters:
T- Type of the field decleration
- 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>
- Direct Known Subclasses:
ResourceBean
public class ProducerFieldBean<T> extends AbstractProducerBean<T>
Defines the producer field component implementation.
-
-
Field Summary
-
Fields inherited from class org.apache.webbeans.component.AbstractOwbBean
enabled, logger, passivatingId, specializedBean, webBeansContext, webBeansType
-
-
Constructor Summary
Constructors Constructor Description ProducerFieldBean(InjectionTargetBean<?> ownerComponent, jakarta.enterprise.inject.spi.BeanAttributes<T> beanAttributes, Class<T> returnType, jakarta.enterprise.inject.spi.ProducerFactory<T> producerFactory)Defines the new producer field component.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddToStringInfo(StringBuilder builder)For producer beans we add the info about the owner componentTcreate(jakarta.enterprise.context.spi.CreationalContext<T> creationalContext)FieldgetCreatorField()Gets creator field.StringgetId()get the unique Id of the bean.booleanisPassivationCapable()True if passivation capable false otherwise.voidsetProducerField(Field field)Set producer field.-
Methods inherited from class org.apache.webbeans.component.AbstractProducerBean
checkNullInstance, checkScopeType, getOwnerComponent, getProducer, getReturnType, isPassivationCapable, providedId
-
Methods inherited from class org.apache.webbeans.component.AbstractOwbBean
destroy, equals, getBeanClass, getInjectionPoints, getLogger, getWebBeansContext, getWebBeansType, hashCode, isDependent, isEnabled, isSpecializedBean, setEnabled, setSpecializedBean, toString
-
Methods inherited from class org.apache.webbeans.component.BeanAttributesImpl
getName, getQualifiers, getScope, getStereotypes, getTypes, isAlternative
-
-
-
-
Constructor Detail
-
ProducerFieldBean
public ProducerFieldBean(InjectionTargetBean<?> ownerComponent, jakarta.enterprise.inject.spi.BeanAttributes<T> beanAttributes, Class<T> returnType, jakarta.enterprise.inject.spi.ProducerFactory<T> producerFactory)
Defines the new producer field component.- Parameters:
returnType- type of the field decleration
-
-
Method Detail
-
create
public T create(jakarta.enterprise.context.spi.CreationalContext<T> creationalContext)
- Specified by:
createin interfacejakarta.enterprise.context.spi.Contextual<T>- Overrides:
createin classAbstractOwbBean<T>
-
getCreatorField
public Field getCreatorField()
Gets creator field.- Returns:
- creator field
-
setProducerField
public void setProducerField(Field field)
Set producer field.- Parameters:
field- producer field
-
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
-
getId
public String 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.
-
addToStringInfo
protected void addToStringInfo(StringBuilder builder)
For producer beans we add the info about the owner component- Overrides:
addToStringInfoin classAbstractOwbBean<T>
-
-