Class InterceptorBeanBuilder<T,​B extends InterceptorBean<T>>

    • Field Detail

      • annotatedType

        protected final jakarta.enterprise.inject.spi.AnnotatedType<T> annotatedType
      • beanAttributes

        protected final jakarta.enterprise.inject.spi.BeanAttributes<T> beanAttributes
      • interceptionMethods

        protected Map<jakarta.enterprise.inject.spi.InterceptionType,​Method[]> interceptionMethods
    • Constructor Detail

      • InterceptorBeanBuilder

        protected InterceptorBeanBuilder​(WebBeansContext webBeansContext,
                                         jakarta.enterprise.inject.spi.AnnotatedType<T> annotatedType,
                                         jakarta.enterprise.inject.spi.BeanAttributes<T> beanAttributes)
    • Method Detail

      • isInterceptorEnabled

        public abstract boolean isInterceptorEnabled()
        If this method returns false the getBean() method must not get called.
        Returns:
        true if the Interceptor is enabled and a Bean should get created
      • checkInterceptorConditions

        protected void checkInterceptorConditions()
      • defineInterceptorMethods

        public boolean defineInterceptorMethods()

        Grab all methods which act as interceptors for the various InterceptionTypes.

        This method will also check some rules, e.g. that there must not be more than a single AroundInvoke method on a class.

        For the interceptors where multiple are allowed, the following rules apply:

        • Superclass methods first
        • Non-private methods override and derogates their superclass counterparts.
        • Private methods with the same signature stack (superclass first).
        • There must only be a single method for each InterceptorType in the same class.

        Returns:
        true if we found some interceptor methods
      • createBean

        protected abstract B createBean​(Class<T> beanClass,
                                        boolean enabled,
                                        Map<jakarta.enterprise.inject.spi.InterceptionType,​Method[]> interceptionMethods)
      • getBean

        public B getBean()