ReferenceList ref = (ReferenceList)fields[i].getAnnotation(ReferenceList.class);
TreferenceList tref = generateTrefList(ref, reflMap);
components.add(tref);
} else {
Tproperty tp = createTproperty(fields[i].getName(), fields[i].getAnnotation(Inject.class));
props.add(tp);
}
}
}
// check if the bean also declares init, destroy or inject annotation on methods
Method[] methods = clazz.getDeclaredMethods();
for (int i = 0; i < methods.length; i++) {
if (methods[i].isAnnotationPresent(Init.class)) {
tbean.setInitMethod(methods[i].getName());
} else if (methods[i].isAnnotationPresent(Destroy.class)) {
tbean.setDestroyMethod(methods[i].getName());
} else if (methods[i].isAnnotationPresent(Inject.class)) {
String propertyName = convertFromMethodName(methods[i].getName());
Tproperty tp = createTproperty(propertyName, methods[i].getAnnotation(Inject.class));
props.add(tp);
} else if (methods[i].isAnnotationPresent(Arg.class)) {
Targument targ = createTargument(methods[i].getAnnotation(Arg.class));
props.add(targ);
}