Class Decorators


  • public class Decorators
    extends Object
    Helper class for inspections.
    Author:
    Marius Bogoevici
    • Method Detail

      • getDecoratorMethods

        public static Set<InvokableAnnotatedMethod<?>> getDecoratorMethods​(BeanManagerImpl beanManager,
                                                                           WeldDecorator<?> decorator)
        Determines the set of InvokableAnnotatedMethods representing decorated methods of the specified decorator. A decorated method is any method declared by a decorated type which is implemented by the decorator.
        Parameters:
        beanManager - the bean manager
        decorator - the specified decorator
        Returns:
        the set of InvokableAnnotatedMethods representing decorated methods of the specified decorator
      • checkDelegateType

        public static void checkDelegateType​(Decorator<?> decorator)
        Check whether the delegate type implements or extends all decorated types.
        Parameters:
        decorator -
        Throws:
        DefinitionException - If the delegate type doesn't implement or extend all decorated types
      • checkAbstractMethods

        public static <T> void checkAbstractMethods​(Set<Type> decoratedTypes,
                                                    EnhancedAnnotatedType<T> type,
                                                    BeanManagerImpl beanManager)
        Check all abstract methods are declared by the decorated types.
        Parameters:
        type -
        beanManager -
        delegateType -
        Throws:
        DefinitionException - If any of the abstract methods is not declared by the decorated types
      • isPassivationCapable

        public static boolean isPassivationCapable​(Decorator<?> decorator)
        Indicates whether a Decorator is passivation capable or not.
        Returns: