Package org.infinispan.cdi.common.util
Class Beans
- java.lang.Object
-
- org.infinispan.cdi.common.util.Beans
-
public class Beans extends Object
A set of utility methods for working with beans.- Author:
- Pete Muir
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Set<Annotation>buildQualifiers(Set<Annotation> annotations)Returns a new set with @Default and @Any added as neededstatic voidcheckReturnValue(Object instance, Bean<?> bean, InjectionPoint injectionPoint, BeanManager beanManager)static <X> List<InjectionPoint>createInjectionPoints(AnnotatedMethod<X> method, Bean<?> declaringBean, BeanManager beanManager)Given a method, and the bean on which the method is declared, create a collection of injection points representing the parameters of the method.
-
-
-
Method Detail
-
buildQualifiers
public static Set<Annotation> buildQualifiers(Set<Annotation> annotations)
Returns a new set with @Default and @Any added as needed- Returns:
-
checkReturnValue
public static void checkReturnValue(Object instance, Bean<?> bean, InjectionPoint injectionPoint, BeanManager beanManager)
-
createInjectionPoints
public static <X> List<InjectionPoint> createInjectionPoints(AnnotatedMethod<X> method, Bean<?> declaringBean, BeanManager beanManager)
Given a method, and the bean on which the method is declared, create a collection of injection points representing the parameters of the method.- Type Parameters:
X- the type declaring the method- Parameters:
method- the methoddeclaringBean- the bean on which the method is declaredbeanManager- the bean manager to use to create the injection points- Returns:
- the injection points
-
-