[JSR308] Annotation dump utility

Joe Darcy Joe.Darcy at Sun.COM
Fri Feb 9 14:50:39 EST 2007


Trevor Harmon wrote:
> In the process of modifying javac to support loop annotations (see my 
> other email to the jsr308-statements list), I needed a tool that would 
> reveal annotation data embedded in a class file.

FYI, for the related task of printing out annotations from class files 
in a source-like format, JDK 6 javac can be used:

 >javac -Xprint javax.annotation.processing.SupportedAnnotationTypes
package javax.annotation.processing;

@java.lang.annotation.Documented
@java.lang.annotation.Target({java.lang.annotation.ElementType.TYPE})
@java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.RUNTIME)
public @interface SupportedAnnotationTypes {

   java.lang.String[] value();
}

-Joe



More information about the JSR308 mailing list