Package org.apache.webbeans.component
Class AbstractProducerBean<T>
java.lang.Object
org.apache.webbeans.component.BeanAttributesImpl<T>
org.apache.webbeans.component.AbstractOwbBean<T>
org.apache.webbeans.component.AbstractProducerBean<T>
- Type Parameters:
T- bean type info
- 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:
ProducerFieldBean,ProducerMethodBean
Abstract class for producer components.
- Version:
- $Rev$ $Date$
-
Field Summary
Fields inherited from class org.apache.webbeans.component.AbstractOwbBean
enabled, logger, passivatingId, specializedBean, webBeansContext, webBeansType -
Constructor Summary
ConstructorsConstructorDescriptionAbstractProducerBean(InjectionTargetBean<?> ownerComponent, WebBeansType webBeansType, jakarta.enterprise.inject.spi.BeanAttributes<T> beanAttributes, Class<T> returnType, jakarta.enterprise.inject.spi.ProducerFactory<?> producerFactory) Create a new instance. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcheckNullInstance(Object instance, String producerName) Check null control.protected voidcheckScopeType(String producerName, Object instance) Check passivation check.jakarta.enterprise.inject.spi.Producer<T>Gets type of the producer method/field or the bean class if it's not a producer.protected booleanisPassivationCapable(Class<?> returnType, Integer modifiers) protected StringMethods inherited from class org.apache.webbeans.component.AbstractOwbBean
addToStringInfo, create, destroy, equals, getBeanClass, getId, getInjectionPoints, getLogger, getWebBeansContext, getWebBeansType, hashCode, isDependent, isEnabled, isPassivationCapable, 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
-
Constructor Details
-
AbstractProducerBean
public AbstractProducerBean(InjectionTargetBean<?> ownerComponent, WebBeansType webBeansType, jakarta.enterprise.inject.spi.BeanAttributes<T> beanAttributes, Class<T> returnType, jakarta.enterprise.inject.spi.ProducerFactory<?> producerFactory) Create a new instance.- Parameters:
returnType- bean type info
-
-
Method Details
-
getProducer
- Returns:
- the producer for this bean;
-
getReturnType
Description copied from class:AbstractOwbBeanGets type of the producer method/field or the bean class if it's not a producer. This basically determines the class which will get created.- Specified by:
getReturnTypein interfaceOwbBean<T>- Overrides:
getReturnTypein classAbstractOwbBean<T>- Returns:
- type of the producer method
- See Also:
-
getOwnerComponent
-
providedId
- Overrides:
providedIdin classAbstractOwbBean<T>
-
checkNullInstance
Check null control.- Parameters:
instance- bean instance
-
checkScopeType
Check passivation check. -
isPassivationCapable
-