CodeFactory cf = CodeFactory.getFactory(language);
for (Class annotation : annotationList) {
_log.info("============================");
_log.info("Processing " + annotation.getName() + "...");
// retrieve the processor for this annotation
Processor p = cf.getProcessor(annotation);
// get all classes that are marked with this annotation
Set<String> serviceClasses = db.getAnnotationIndex().get(
annotation.getName());
if (serviceClasses == null || serviceClasses.size() == 0) {
_log.info(" No classes found.");
continue;
}
for (String className : serviceClasses) {
_log.info(" Found " + className);
try {
Map<String, Object> params = populateParams(annotation
.getSimpleName(), className);
params.put("annotation", annotation.getName());
p.execute(params);
} catch (Exception e) {
_log.error("Failed to process class [" + className
+ "] for annotation [" + annotation + "]", e);
}
}