Search in sources :

Example 1 with MethodInjectionPoint

use of org.jboss.weld.injection.MethodInjectionPoint in project core by weld.

the class Beans method injectFieldsAndInitializers.

public static <T> void injectFieldsAndInitializers(T instance, CreationalContext<T> ctx, BeanManagerImpl beanManager, List<? extends Iterable<? extends FieldInjectionPoint<?, ?>>> injectableFields, List<? extends Iterable<? extends MethodInjectionPoint<?, ?>>> initializerMethods) {
    if (injectableFields.size() != initializerMethods.size()) {
        throw UtilLogger.LOG.invalidQuantityInjectableFieldsAndInitializerMethods(injectableFields, initializerMethods);
    }
    for (int i = 0; i < injectableFields.size(); i++) {
        injectBoundFields(instance, ctx, beanManager, injectableFields.get(i));
        callInitializers(instance, ctx, beanManager, initializerMethods.get(i));
    }
}
Also used : FieldInjectionPoint(org.jboss.weld.injection.FieldInjectionPoint) MethodInjectionPoint(org.jboss.weld.injection.MethodInjectionPoint)

Aggregations

FieldInjectionPoint (org.jboss.weld.injection.FieldInjectionPoint)1 MethodInjectionPoint (org.jboss.weld.injection.MethodInjectionPoint)1