@SuppressWarnings("unchecked")
Class<AnnotationDescriptor> fieldDescriptorClass = (Class<AnnotationDescriptor>) clazz;
try {
AnnotationContainer.getInstance().registerAnnotation(fieldDescriptorClass.newInstance());
} catch (InstantiationException e) {
throw new AnnotationDescriptorNotFoundException("Can't instantiate "
+ fieldDescriptorClass.getName(), e);
} catch (IllegalAccessException e) {
throw new AnnotationDescriptorNotFoundException("A constructor " + fieldDescriptorClass.getName()
+ " is not accessible", e);
}
}
} catch (ClassNotFoundException e) {
throw new AnnotationDescriptorNotFoundException(e);
} catch (IOException e) {
throw new AnnotationDescriptorNotFoundException(e);
}
}