Package org.jboss.weld.util
Class Decorators
- java.lang.Object
-
- org.jboss.weld.util.Decorators
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> voidcheckAbstractMethods(Set<Type> decoratedTypes, EnhancedAnnotatedType<T> type, BeanManagerImpl beanManager)Check all abstract methods are declared by the decorated types.static voidcheckDelegateType(Decorator<?> decorator)Check whether the delegate type implements or extends all decorated types.static WeldInjectionPointAttributes<?,?>findDelegateInjectionPoint(AnnotatedType<?> type, Iterable<InjectionPoint> injectionPoints)static Set<InvokableAnnotatedMethod<?>>getDecoratorMethods(BeanManagerImpl beanManager, WeldDecorator<?> decorator)Determines the set ofInvokableAnnotatedMethods representing decorated methods of the specified decorator.static <T> TgetOuterDelegate(Bean<T> bean, T instance, CreationalContext<T> creationalContext, Class<T> proxyClass, InjectionPoint originalInjectionPoint, BeanManagerImpl manager, List<Decorator<?>> decorators)static booleanisPassivationCapable(Decorator<?> decorator)Indicates whether aDecoratoris passivation capable or not.
-
-
-
Method Detail
-
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(AnnotatedType<?> type, Iterable<InjectionPoint> injectionPoints)
-
getOuterDelegate
public static <T> T getOuterDelegate(Bean<T> bean, T instance, CreationalContext<T> creationalContext, Class<T> proxyClass, InjectionPoint originalInjectionPoint, BeanManagerImpl manager, List<Decorator<?>> decorators)
-
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
-
-