Hi all,
I'm using annotations for generating documentation for an API that I'm publishing. I have it defined like this:
@Documented
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
public @interface PropertyInfo {
String description();
String since() default "5.8";
String link() default "";
}
Now this works fine when I process the classes using reflection. I can get the list of annotations on the method. The issue I have is that it only works if I instantiate a new instance of the object I'm processing. I would prefer not to have to instantiate them to get the annotation. I tried RetentionPolicy.CLASS but it doesn't work.
Any ideas?