Class AbstractProducerBean<X,​T,​S extends Member>

    • Constructor Detail

      • AbstractProducerBean

        public AbstractProducerBean​(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 Detail

      • getBeanClass

        public Class<?> getBeanClass()
        Description copied from interface: Bean
        The bean class of the managed bean or session bean or of the bean that declares the producer method or field.
        Specified by:
        getBeanClass in interface Bean<X>
        Overrides:
        getBeanClass in class RIBean<T>
        Returns:
        the bean class
      • initType

        protected void initType()
        Initializes the type
      • getInjectionPoints

        public Set<InjectionPoint> getInjectionPoints()
        Description copied from interface: Bean
        Obtains the InjectionPoint objects representing injection points of the bean, that will be validated by the container at initialization time.
        Returns:
        the set of injection points of the bean
      • checkReturnValue

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

        protected boolean isTypeSerializable​(Object instance)
      • create

        public T create​(CreationalContext<T> creationalContext)
        Creates an instance of the bean
        Parameters:
        creationalContext - the context in which this instance is being created
        Returns:
        the contextual instance
      • destroy

        public void destroy​(T instance,
                            CreationalContext<T> creationalContext)
        Description copied from interface: Contextual
        Destroy an instance of the contextual type. Implementations should call CreationalContext.release() to allow the container to destroy dependent objects of the contextual instance.
        Specified by:
        destroy in interface Contextual<X>
        Overrides:
        destroy in class RIBean<T>
        Parameters:
        instance - the contextual instance to destroy
        creationalContext - the context in which this instance was created
      • getDeclaringBean

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