Class AbstractOwbBean<T>

    • Field Detail

      • logger

        protected Logger logger
        Logger instance
      • webBeansType

        protected WebBeansType webBeansType
        Web Beans type
      • specializedBean

        protected boolean specializedBean
        This bean is specialized or not
      • enabled

        protected boolean enabled
        This bean is enabled or disabled
      • passivatingId

        protected String passivatingId
        This string will be used for passivating the Bean. It will be created on the first use.
        See Also:
        getId()
    • Constructor Detail

      • AbstractOwbBean

        protected AbstractOwbBean​(WebBeansContext webBeansContext,
                                  WebBeansType webBeansType,
                                  jakarta.enterprise.inject.spi.BeanAttributes<T> beanAttributes,
                                  Class<?> beanClass)
    • Method Detail

      • getWebBeansContext

        public WebBeansContext getWebBeansContext()
        Get the web beans context this bean is associated with
        Specified by:
        getWebBeansContext in interface OwbBean<T>
        Returns:
        WebBeansContext this bean is associated with
      • getBeanClass

        public Class<?> getBeanClass()
        Specified by:
        getBeanClass in interface jakarta.enterprise.inject.spi.Bean<T>
      • create

        public T create​(jakarta.enterprise.context.spi.CreationalContext<T> creationalContext)
        Specified by:
        create in interface jakarta.enterprise.context.spi.Contextual<T>
      • destroy

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

        public String getId()
        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 jakarta.enterprise.inject.spi.PassivationCapable
        Returns:
        id of the bean
      • providedId

        protected String providedId()
      • isPassivationCapable

        public boolean isPassivationCapable()
        Description copied from interface: OwbBean
        True if passivation capable false otherwise.
        Specified by:
        isPassivationCapable in interface OwbBean<T>
        Returns:
        true if this bean is passivation capable
      • getReturnType

        public Class<T> getReturnType()
        Gets type of the producer method/field or the bean class if it's not a producer. This basically determines the class which will get created.
        Specified by:
        getReturnType in interface OwbBean<T>
        Returns:
        type of the producer method
        See Also:
        getBeanClass()
      • getInjectionPoints

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

        public void setSpecializedBean​(boolean specialized)
        Set specialized flag.
        Specified by:
        setSpecializedBean in interface OwbBean<T>
        Parameters:
        specialized - flag
      • setEnabled

        public void setEnabled​(boolean enabled)
        Set enableed flag.
        Specified by:
        setEnabled in interface OwbBean<T>
        Parameters:
        enabled - flag
      • isSpecializedBean

        public boolean isSpecializedBean()
        Returns true if bean is a specialized bean, false otherwise.
        Specified by:
        isSpecializedBean in interface OwbBean<T>
        Returns:
        true if bean is a specialized bean
      • isEnabled

        public boolean isEnabled()
        Bean is enabled or not.
        Specified by:
        isEnabled in interface OwbBean<T>
        Returns:
        true if enabled
      • addToStringInfo

        protected void addToStringInfo​(StringBuilder builder)
        This method can be used to add additional info about the Bean
        Parameters:
        builder -
      • getLogger

        protected Logger getLogger()
        The Logger should really only be used to log errors!
      • isDependent

        public boolean isDependent()
        Description copied from interface: OwbBean
        This determines if this bean is really a dependent bean, and as such always creats a freshl instance for each InjectionPoint. A BeanManagerBean is e.g. not a dependent bean.
        Specified by:
        isDependent in interface OwbBean<T>
        Returns:
        true if this is a dependent bean
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object