Package org.jboss.weld.bean
Class AbstractProducerBean<X,T,S extends Member>
java.lang.Object
org.jboss.weld.util.bean.ForwardingBeanAttributes<T>
org.jboss.weld.bean.CommonBean<T>
org.jboss.weld.bean.RIBean<T>
org.jboss.weld.bean.AbstractBean<T,S>
org.jboss.weld.bean.AbstractProducerBean<X,T,S>
- Type Parameters:
X-T-S-
- 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,WeldBean<T>
- Direct Known Subclasses:
ProducerField,ProducerMethod
The implicit producer bean
- Author:
- Gavin King, David Allen, Jozef Hartinger
-
Field Summary
FieldsFields inherited from class org.jboss.weld.bean.AbstractBean
typeFields inherited from class org.jboss.weld.bean.RIBean
beanManager -
Constructor Summary
ConstructorsConstructorDescriptionAbstractProducerBean(jakarta.enterprise.inject.spi.BeanAttributes<T> attributes, org.jboss.weld.serialization.spi.BeanIdentifier identifier, AbstractClassBean<X> declaringBean, BeanManagerImpl beanManager, org.jboss.weld.bootstrap.api.ServiceRegistry services) Constructor -
Method Summary
Modifier and TypeMethodDescriptionprotected TcheckReturnValue(T instance) Validates the return valueprotected voidCreates an instance of the beanvoidabstract jakarta.enterprise.inject.spi.AnnotatedMember<? super X>Returns the annotated item the bean representsClass<?>Returns the declaring beanabstract EnhancedAnnotatedMember<T,?, S> Returns the weld-enhanced annotated item the bean represents.Set<jakarta.enterprise.inject.spi.InjectionPoint>Used for custom beans registered via WeldBeanConfigurator and forProducerFieldandProducerMethodif they explicitly declare thePriorityannotation.protected voidinitType()Initializes the typevoidinternalInitialize(BeanDeployerEnvironment environment) Initializes the bean and its metadatabooleanbooleanprotected booleanisTypeSerializable(Object instance) protected voidMethods inherited from class org.jboss.weld.bean.AbstractBean
checkSpecialization, getProducer, getSpecializedBeans, getType, initializeAfterBeanDiscovery, isDependent, isIgnoreFinalMethods, isProxyRequired, isSpecializing, postSpecialize, preInitialize, preSpecialize, setIgnoreFinalMethods, setProducer, specializeMethods inherited from class org.jboss.weld.bean.RIBean
cleanupAfterBoot, getBeanManager, getContextualInstanceStrategy, getQualifierInstances, initialize, isNormalScoped, isProxyable, setAttributesMethods inherited from class org.jboss.weld.bean.CommonBean
attributes, equals, getId, getIdentifier, hashCode, toString, unwrapMethods inherited from class org.jboss.weld.util.bean.ForwardingBeanAttributes
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, isAlternativeMethods inherited from interface jakarta.enterprise.inject.spi.PassivationCapable
getId
-
Field Details
-
explicitPriority
-
-
Constructor Details
-
AbstractProducerBean
public AbstractProducerBean(jakarta.enterprise.inject.spi.BeanAttributes<T> attributes, org.jboss.weld.serialization.spi.BeanIdentifier identifier, AbstractClassBean<X> declaringBean, BeanManagerImpl beanManager, org.jboss.weld.bootstrap.api.ServiceRegistry services) Constructor- Parameters:
declaringBean- The declaring beanbeanManager- The Bean manager
-
-
Method Details
-
getBeanClass
- Specified by:
getBeanClassin interfacejakarta.enterprise.inject.spi.Bean<X>- Overrides:
getBeanClassin classRIBean<T>
-
initType
protected void initType()Initializes the type -
internalInitialize
Initializes the bean and its metadata- Overrides:
internalInitializein classAbstractBean<T,S extends Member>
-
isPassivationCapableBean
public boolean isPassivationCapableBean()- Specified by:
isPassivationCapableBeanin classRIBean<T>
-
isPassivationCapableDependency
public boolean isPassivationCapableDependency()- Specified by:
isPassivationCapableDependencyin classRIBean<T>
-
getInjectionPoints
-
checkReturnValue
Validates the return value- Parameters:
instance- The instance to validate
-
checkType
protected void checkType()- Specified by:
checkTypein classAbstractBean<T,S extends Member>
-
isTypeSerializable
-
create
Creates an instance of the bean -
destroy
-
getDeclaringBean
Returns the declaring bean- Returns:
- The bean representation
-
getAnnotated
Description copied from class:AbstractBeanReturns the annotated item the bean represents- Specified by:
getAnnotatedin classAbstractBean<T,S extends Member> - Returns:
- The annotated item
-
getEnhancedAnnotated
Description copied from class:AbstractBeanReturns the weld-enhanced annotated item the bean represents. The item is only available during bootstrap. The method throwsIllegalStateExceptionat runtime.- Specified by:
getEnhancedAnnotatedin classAbstractBean<T,S extends Member> - Returns:
- The annotated item
-
getPriority
Description copied from interface:WeldBeanUsed for custom beans registered via WeldBeanConfigurator and forProducerFieldandProducerMethodif they explicitly declare thePriorityannotation. All other implementations will returnnullby default.- Returns:
- bean priority or null if not set or overridden
-
processExplicitPriority
protected void processExplicitPriority()
-