Package org.jboss.weld.util
Class Decorators
java.lang.Object
org.jboss.weld.util.Decorators
Helper class for inspections.
- Author:
- Marius Bogoevici
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> voidcheckAbstractMethods(Set<Type> decoratedTypes, EnhancedAnnotatedType<T> type, BeanManagerImpl beanManager) Check all abstract methods are declared by the decorated types.static voidcheckDelegateType(jakarta.enterprise.inject.spi.Decorator<?> decorator) Check whether the delegate type implements or extends all decorated types.static WeldInjectionPointAttributes<?,?> findDelegateInjectionPoint(jakarta.enterprise.inject.spi.AnnotatedType<?> type, Iterable<jakarta.enterprise.inject.spi.InjectionPoint> injectionPoints) static Set<InvokableAnnotatedMethod<?>>getDecoratorMethods(BeanManagerImpl beanManager, WeldDecorator<?> decorator) Determines the set ofInvokableAnnotatedMethods representing decorated methods of the specified decorator.static <T> TgetOuterDelegate(jakarta.enterprise.inject.spi.Bean<T> bean, T instance, jakarta.enterprise.context.spi.CreationalContext<T> creationalContext, Class<T> proxyClass, jakarta.enterprise.inject.spi.InjectionPoint originalInjectionPoint, BeanManagerImpl manager, List<jakarta.enterprise.inject.spi.Decorator<?>> decorators) static booleanisPassivationCapable(jakarta.enterprise.inject.spi.Decorator<?> decorator) Indicates whether aDecoratoris passivation capable or not.
-
Method Details
-
getDecoratorMethods
public static Set<InvokableAnnotatedMethod<?>> getDecoratorMethods(BeanManagerImpl beanManager, WeldDecorator<?> decorator) Determines the set ofInvokableAnnotatedMethods 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 managerdecorator- the specified decorator- Returns:
- the set of
InvokableAnnotatedMethods representing decorated methods of the specified decorator
-
findDelegateInjectionPoint
public static WeldInjectionPointAttributes<?,?> findDelegateInjectionPoint(jakarta.enterprise.inject.spi.AnnotatedType<?> type, Iterable<jakarta.enterprise.inject.spi.InjectionPoint> injectionPoints) -
getOuterDelegate
public static <T> T getOuterDelegate(jakarta.enterprise.inject.spi.Bean<T> bean, T instance, jakarta.enterprise.context.spi.CreationalContext<T> creationalContext, Class<T> proxyClass, jakarta.enterprise.inject.spi.InjectionPoint originalInjectionPoint, BeanManagerImpl manager, List<jakarta.enterprise.inject.spi.Decorator<?>> decorators) -
checkDelegateType
public static void checkDelegateType(jakarta.enterprise.inject.spi.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(jakarta.enterprise.inject.spi.Decorator<?> decorator) Indicates whether aDecoratoris passivation capable or not.- Returns:
-