FieldDescriptor[] allFields = cd.getAllFieldDescriptors();
for (FieldDescriptor fieldDescriptor : allFields) {
Field field = fieldDescriptor.getField();
PetiteInject ref = field.getAnnotation(PetiteInject.class);
if ((autowire == false) && (ref == null)) {
continue;
}
Class fieldType = field.getType();
if (fieldType == Collection.class || ReflectUtil.isSubclass(fieldType, Collection.class)) {
continue;
}
String[] refName = null;
if (ref != null) {
String name = ref.value().trim();
if (name.length() != 0) {
refName = new String[] {name};
}
}