[JSR308] Annotation dump utility

Eugene Kuleshov eu at javatx.org
Fri Feb 9 12:15:54 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. I couldn't find one 
> anywhere, so I had to write one myself. I'm guessing someone on this 
> list needs (or will need) such a utility, so I've made it available 
> for download here:
>
> http://vocaro.com/trevor/files/dump-annotations.tar.gz
>
> The utility takes a class file as input and prints any annotations it 
> finds. It formats this output to the same struct-like representation 
> that the VM spec uses, making the output easy to read. It can be 
> extended without much effort to dump custom annotation formats.
  BTW, TraceClassVisitor from the util package of the in ASM framework 
[1] prints standard annotations in format used in the Java language. It 
should be also easy to extend it to print nonstandard annotations from 
new attributes.

  regards,
  Eugene

[1] http://asm.objectweb.org/





More information about the JSR308 mailing list