This content has been marked as final.
Show 2 replies
-
1. Re: how to annotate a field
parkinm May 7, 2008 5:06 AM (in response to ugn)Hi,
Read the JavaDoc on AnnotationsAttributes at http://www.csg.is.titech.ac.jp/~chiba/javassist/html/javassist/bytecode/AnnotationsAttribute.html
The first snippet gets the annotation from the method. The second snippet adds an annotation to a class - it's the same process to add an annotation to a method (call .setAttribute() on the method not the class).
Michael. -
2. Re: how to annotate a field
ugn May 13, 2008 11:57 AM (in response to ugn)ok thank you very much this works for me