Package org.jboss.weld.util
Class Decorators
- java.lang.Object
-
- org.jboss.weld.util.Decorators
-
public class Decorators extends Object
Helper class for inspections.- Author:
- Marius Bogoevici
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> void
checkAbstractMethods(Set<Type> decoratedTypes, EnhancedAnnotatedType<T> type, BeanManagerImpl beanManager)
Check all abstract methods are declared by the decorated types.static void
checkDelegateType(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 ofInvokableAnnotatedMethod
s representing decorated methods of the specified decorator.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)
static boolean
isPassivationCapable(jakarta.enterprise.inject.spi.Decorator<?> decorator)
Indicates whether aDecorator
is passivation capable or not.
-
-
-
Method Detail
-
getDecoratorMethods
public static Set<InvokableAnnotatedMethod<?>> getDecoratorMethods(BeanManagerImpl beanManager, WeldDecorator<?> decorator)
Determines the set ofInvokableAnnotatedMethod
s 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
InvokableAnnotatedMethod
s 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 aDecorator
is passivation capable or not.- Returns:
-
-