Methods Summary |
---|
private void | constructClassList()
// check whether this class is in the skip list
if (!Factory.isSkipAnnotationProcessing(clazz.getName())) {
classes.add(clazz);
}
Class parent = clazz;
while ((parent = parent.getSuperclass()) != null) {
if (parent.getPackage() == null ||
!parent.getPackage().getName().startsWith("java.lang")) {
// always check whether this class is in the class list
// for skipping annotation processing
if (!Factory.isSkipAnnotationProcessing(parent.getName())) {
classes.add(0, parent);
}
}
}
|
public java.lang.reflect.Constructor[] | getConstructors()
return constructors.toArray(new Constructor[constructors.size()]);
|
public java.lang.reflect.Field[] | getFields()
return fields.toArray(new Field[fields.size()]);
|
public java.lang.reflect.Method[] | getMethods()
return methodMap.values().toArray(new Method[methodMap.size()]);
|
private void | initializeConstructors()In P.148 of "The Java Langugage Specification 2/e",
Constructors, static initializers, and instance initializers are not
members and therefore not inherited.
for (Class cl : classes) {
for (Constructor constr : cl.getConstructors()) {
constructors.add(constr);
}
}
|
private void | initializeFields()
for (Class cl : classes) {
for (Field f : cl.getDeclaredFields()) {
fields.add(f);
}
}
|
private void | initializeMethods()
for (Class cl: classes) {
for (Method method : cl.getDeclaredMethods()) {
methodMap.put(new MethodKey(method), method);
}
}
|