Class AbstractProducerBean<X,T,S extends Member>

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

public abstract class AbstractProducerBean<X,T,S extends Member> extends AbstractBean<T,S>
The implicit producer bean
Author:
Gavin King, David Allen, Jozef Hartinger
  • Field Details

    • explicitPriority

      protected Integer 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 bean
      beanManager - The Bean manager
  • Method Details

    • getBeanClass

      public Class<?> getBeanClass()
      Specified by:
      getBeanClass in interface jakarta.enterprise.inject.spi.Bean<X>
      Overrides:
      getBeanClass in class RIBean<T>
    • initType

      protected void initType()
      Initializes the type
    • internalInitialize

      public void internalInitialize(BeanDeployerEnvironment environment)
      Initializes the bean and its metadata
      Overrides:
      internalInitialize in class AbstractBean<T,S extends Member>
    • isPassivationCapableBean

      public boolean isPassivationCapableBean()
      Specified by:
      isPassivationCapableBean in class RIBean<T>
    • isPassivationCapableDependency

      public boolean isPassivationCapableDependency()
      Specified by:
      isPassivationCapableDependency in class RIBean<T>
    • getInjectionPoints

      public Set<jakarta.enterprise.inject.spi.InjectionPoint> getInjectionPoints()
    • checkReturnValue

      protected T checkReturnValue(T instance)
      Validates the return value
      Parameters:
      instance - The instance to validate
    • checkType

      protected void checkType()
      Specified by:
      checkType in class AbstractBean<T,S extends Member>
    • isTypeSerializable

      protected boolean isTypeSerializable(Object instance)
    • create

      public T create(jakarta.enterprise.context.spi.CreationalContext<T> creationalContext)
      Creates an instance of the bean
    • destroy

      public void destroy(T instance, jakarta.enterprise.context.spi.CreationalContext<T> creationalContext)
      Specified by:
      destroy in interface jakarta.enterprise.context.spi.Contextual<X>
      Overrides:
      destroy in class RIBean<T>
    • getDeclaringBean

      public AbstractClassBean<X> getDeclaringBean()
      Returns the declaring bean
      Returns:
      The bean representation
    • getAnnotated

      public abstract jakarta.enterprise.inject.spi.AnnotatedMember<? super X> getAnnotated()
      Description copied from class: AbstractBean
      Returns the annotated item the bean represents
      Specified by:
      getAnnotated in class AbstractBean<T,S extends Member>
      Returns:
      The annotated item
    • getEnhancedAnnotated

      public abstract EnhancedAnnotatedMember<T,?,S> getEnhancedAnnotated()
      Description copied from class: AbstractBean
      Returns the weld-enhanced annotated item the bean represents. The item is only available during bootstrap. The method throws IllegalStateException at runtime.
      Specified by:
      getEnhancedAnnotated in class AbstractBean<T,S extends Member>
      Returns:
      The annotated item
    • getPriority

      public Integer getPriority()
      Description copied from interface: WeldBean
      Used for custom beans registered via WeldBeanConfigurator and for ProducerField and ProducerMethod if they explicitly declare the Priority annotation. All other implementations will return null by default.
      Returns:
      bean priority or null if not set or overridden
    • processExplicitPriority

      protected void processExplicitPriority()