use of org.b3log.latke.ioc.provider.FieldProvider in project latke by b3log.
the class BeanImpl method initFieldInjectionPoints.
/**
* Initializes field injection points.
*/
private void initFieldInjectionPoints() {
final Set<AnnotatedField<? super T>> annotatedFields = annotatedType.getFields();
for (final AnnotatedField<? super T> annotatedField : annotatedFields) {
final Field field = annotatedField.getJavaMember();
if (field.getType().equals(Provider.class)) {
// by provider
final FieldProvider<T> provider = new FieldProvider<T>(beanManager, annotatedField);
fieldProviders.add(provider);
final FieldInjectionPoint fieldInjectionPoint = new FieldInjectionPoint(this, annotatedField);
fieldInjectionPoints.add(fieldInjectionPoint);
} else {
// by qualifier
final FieldInjectionPoint fieldInjectionPoint = new FieldInjectionPoint(this, annotatedField);
fieldInjectionPoints.add(fieldInjectionPoint);
}
}
}
Aggregations