Class ThirdpartyBeanImpl<T>

  • 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:
    PassivationCapableThirdpartyBeanImpl

    public class ThirdpartyBeanImpl<T>
    extends AbstractOwbBean<T>
    • Constructor Detail

      • ThirdpartyBeanImpl

        public ThirdpartyBeanImpl​(WebBeansContext webBeansContext,
                                  javax.enterprise.inject.spi.Bean<T> bean)
    • Method Detail

      • getProducer

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

        public Set<javax.enterprise.inject.spi.InjectionPoint> getInjectionPoints()
        Description copied from class: AbstractOwbBean
        Specified by:
        getInjectionPoints in interface javax.enterprise.inject.spi.Bean<T>
        Overrides:
        getInjectionPoints in class AbstractOwbBean<T>
      • create

        public T create​(javax.enterprise.context.spi.CreationalContext<T> context)
        Description copied from class: AbstractOwbBean
        Specified by:
        create in interface javax.enterprise.context.spi.Contextual<T>
        Overrides:
        create in class AbstractOwbBean<T>
      • destroy

        public void destroy​(T instance,
                            javax.enterprise.context.spi.CreationalContext<T> context)
        Specified by:
        destroy in interface javax.enterprise.context.spi.Contextual<T>
        Overrides:
        destroy in class AbstractOwbBean<T>
      • getId

        public String getId()
        Description copied from class: AbstractOwbBean
        get the unique Id of the bean. This will get used as reference on passivation. Gets id of the bean.
        Specified by:
        getId in interface OwbBean<T>
        Specified by:
        getId in interface javax.enterprise.inject.spi.PassivationCapable
        Overrides:
        getId in class AbstractOwbBean<T>
        Returns:
        id of the bean
      • getBeanClass

        public Class<?> getBeanClass()
        Specified by:
        getBeanClass in interface javax.enterprise.inject.spi.Bean<T>
        Overrides:
        getBeanClass in class AbstractOwbBean<T>
      • isAlternative

        public boolean isAlternative()
        Specified by:
        isAlternative in interface javax.enterprise.inject.spi.BeanAttributes<T>
        Overrides:
        isAlternative in class BeanAttributesImpl<T>
      • hashCode

        public int hashCode()
        We need to override the hash code from the AbstractOwbBean and delegate to the shaded instance.
        Overrides:
        hashCode in class AbstractOwbBean<T>
        Returns:
        the hash mixed with the shadowed bean.