JavaClass[] classes = manager.getAllClasses();
for (int i = 0; i < classes.length; i++) {
JavaClass clazz = classes[i];
logInfo("class [" + clazz.getFullyQualifiedName() + ']');
try {
AttributeEnhancer enhancer = new AsmAttributeEnhancer();
if (enhancer.initialize(clazz.getFullyQualifiedName(), classPath)) {
handleClassAnnotations(manager, enhancer, clazz);
handleInnerClassAnnotations(manager, enhancer, clazz, classPath, destDir);
JavaMethod[] methods = clazz.getMethods();
for (int j = 0; j < methods.length; j++) {
JavaMethod method = methods[j];
if (method.isConstructor()) {
handleConstructorAnnotations(manager, enhancer, method);
} else {
handleMethodAnnotations(manager, enhancer, method);
}
}
JavaField[] fields = clazz.getFields();
for (int j = 0; j < fields.length; j++) {
handleFieldAnnotations(manager, enhancer, fields[j]);
}
// write enhanced class to disk
enhancer.write(destDir);
}
} catch (Throwable e) {
e.printStackTrace();
logWarning("could not compile annotations for class ["
+ clazz.getFullyQualifiedName()