Class AbstractProducerBean<T>

  • Type Parameters:
    T - bean type info
    All Implemented Interfaces:
    javax.enterprise.context.spi.Contextual<T>, javax.enterprise.inject.spi.Bean<T>, javax.enterprise.inject.spi.BeanAttributes<T>, javax.enterprise.inject.spi.PassivationCapable, OwbBean<T>
    Direct Known Subclasses:
    ProducerFieldBean, ProducerMethodBean

    public class AbstractProducerBean<T>
    extends AbstractOwbBean<T>
    Abstract class for producer components.
    Version:
    $Rev$ $Date$
    • Constructor Detail

      • AbstractProducerBean

        public AbstractProducerBean​(InjectionTargetBean<?> ownerComponent,
                                    WebBeansType webBeansType,
                                    javax.enterprise.inject.spi.BeanAttributes<T> beanAttributes,
                                    Class<T> returnType,
                                    javax.enterprise.inject.spi.ProducerFactory<?> producerFactory)
        Create a new instance.
        Parameters:
        returnType - bean type info
    • Method Detail

      • getProducer

        public javax.enterprise.inject.spi.Producer<T> getProducer()
        Returns:
        the producer for this bean;
      • checkNullInstance

        protected void checkNullInstance​(Object instance,
                                         String producerName)
        Check null control.
        Parameters:
        instance - bean instance
      • checkScopeType

        protected void checkScopeType​(String producerName,
                                      Object instance)
        Check passivation check.
      • isPassivationCapable

        protected boolean isPassivationCapable​(Class<?> returnType,
                                               Integer modifiers)