try {
ANNOTATION_DEFINITION.load(new FileInputStream(propertiesFile));
} catch (Exception e) {
String message = "custom annotation properties can not be loaded: " + e.toString();
logWarning(message);
throw new DefinitionException(message);
}
for (Iterator it = ANNOTATION_DEFINITION.entrySet().iterator(); it.hasNext();) {
Map.Entry entry = (Map.Entry) it.next();
String name = ((String) entry.getKey()).trim();
String className = ((String) entry.getValue()).trim();
Class klass;
if (className.equals("")) {
// use default untyped annotation proxy
klass = UntypedAnnotationProxy.class;
className = klass.getName();
} else {
try {
klass = s_loader.loadClass(className);
} catch (ClassNotFoundException e) {
String message = className
+ " could not be found on system classpath or class path provided as argument to the compiler";
logError(message);
throw new DefinitionException(message);
}
}
logInfo("register custom annotation [" + name + " :: " + className + ']');
manager.registerAnnotationProxy(klass, name);
s_customAnnotations.put(name, className);