@SuppressWarnings("rawtypes")
public boolean provideInjection(final PlasticField field, final ObjectLocator locator, final MutableComponentModel componentModel) {
Class type = cache.forName(field.getTypeName());
if(InternalUtils.isManagedByTapestry(
type,
new AnnotationProvider(){
public <T extends Annotation> T getAnnotation(
Class<T> annotationClass) {
return field.getAnnotation(annotationClass);
}},
locator)){
logger.debug("Field "+field.getName()+" of type "+field.getTypeName()+" is managed by Tapestry");
return false;
}
logger.debug("Field "+field.getName()+" of type "+field.getTypeName()+" will be managed by CDI");
final Class<?> fieldClass = load(field.getTypeName());
final Annotation[] qualifiers =
InternalUtils.getFieldQualifiers(type, new AnnotationProvider(){
public <T extends Annotation> T getAnnotation(
Class<T> annotationClass) {
return field.getAnnotation(annotationClass);
}});