use of javax.enterprise.inject.spi.InjectionPoint in project deltaspike by apache.
the class BeanUtils method createInjectionPoints.
/**
* Given a method, and the bean on which the method is declared, create a
* collection of injection points representing the parameters of the method.
*
* @param <X> the type declaring the method
* @param method the method
* @param declaringBean the bean on which the method is declared
* @param beanManager the bean manager to use to create the injection points
* @return the injection points
*/
public static <X> List<InjectionPoint> createInjectionPoints(AnnotatedMethod<X> method, Bean<?> declaringBean, BeanManager beanManager) {
List<InjectionPoint> injectionPoints = new ArrayList<InjectionPoint>();
for (AnnotatedParameter<X> parameter : method.getParameters()) {
InjectionPoint injectionPoint = new ImmutableInjectionPoint(parameter, beanManager, declaringBean, false, false);
injectionPoints.add(injectionPoint);
}
return injectionPoints;
}
Aggregations