Class AbstractClassBean<T>

  • Type Parameters:
    T - the type of class for the bean
    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, ClassBean<T>, DecorableBean<T>, WeldBean<T>
    Direct Known Subclasses:
    ManagedBean

    public abstract class AbstractClassBean<T>
    extends AbstractBean<T,​Class<T>>
    implements DecorableBean<T>, ClassBean<T>
    An abstract bean representation common for class-based beans
    Author:
    Pete Muir, David Allen, Jozef Hartinger
    • Constructor Detail

      • AbstractClassBean

        protected AbstractClassBean​(jakarta.enterprise.inject.spi.BeanAttributes<T> attributes,
                                    EnhancedAnnotatedType<T> type,
                                    org.jboss.weld.serialization.spi.BeanIdentifier identifier,
                                    BeanManagerImpl beanManager)
        Constructor
        Parameters:
        type - The type
        beanManager - The Bean manager
    • Method Detail

      • hasDecorators

        public boolean hasDecorators()
      • getDecorators

        public List<jakarta.enterprise.inject.spi.Decorator<?>> getDecorators()
        Description copied from interface: DecorableBean
        Resolves decorators for this bean.
        Specified by:
        getDecorators in interface DecorableBean<T>
      • initType

        protected void initType()
        Initializes the bean type
      • checkBeanImplementation

        protected void checkBeanImplementation()
        Validates the bean implementation
      • cleanupAfterBoot

        public void cleanupAfterBoot()
        Description copied from class: RIBean
        This method is called after the container is started allowing the bean to release any resources that are only required at boot time
        Specified by:
        cleanupAfterBoot in class RIBean<T>
      • isInterceptionCandidate

        protected abstract boolean isInterceptionCandidate()
      • getInjectionPoints

        public Set<jakarta.enterprise.inject.spi.InjectionPoint> getInjectionPoints()
        Specified by:
        getInjectionPoints in interface jakarta.enterprise.inject.spi.Bean<T>
      • hasInterceptors

        public boolean hasInterceptors()
      • getProducer

        public jakarta.enterprise.inject.spi.InjectionTarget<T> getProducer()
        Description copied from interface: ClassBean
        Returns injection target used to produce instances of this bean
        Specified by:
        getProducer in interface ClassBean<T>
        Overrides:
        getProducer in class AbstractBean<T,​Class<T>>
        Returns:
        the injection target
      • setProducer

        public void setProducer​(jakarta.enterprise.inject.spi.InjectionTarget<T> producer)
      • getInjectionTarget

        public jakarta.enterprise.inject.spi.InjectionTarget<T> getInjectionTarget()
        Duplicate of getProducer() - kept for backwards compatibility.
      • setInjectionTarget

        public void setInjectionTarget​(jakarta.enterprise.inject.spi.InjectionTarget<T> injectionTarget)
      • setProducer

        public void setProducer​(jakarta.enterprise.inject.spi.Producer<T> producer)
        Description copied from class: AbstractBean
        Set a Producer for this bean. This operation is *not* threadsafe, and should not be called outside bootstrap.
        Overrides:
        setProducer in class AbstractBean<T,​Class<T>>