RuntimeVisibleTypeAnnotations should be a Code attribute, not a Method attribute
jonathan.gibbons at oracle.com
Sun Feb 24 18:48:22 PST 2013
On 02/24/2013 06:17 PM, Werner Dietl wrote:
> Jon, all,
> Eric Bruneton mentions on the spec-comments list that
> RuntimeVisibleTypeAnnotations should be a Code attribute, not a Method
> How can I very whether this is the case or not?
> I looked at:
> but I don't see where a decision between Code and Method is made...
> both have attributes and I don't see where
> RuntimeInvisibleTypeAnnotations_attribute is put in one or the other.
> Before I spend more time in debugging, do you know where this happens?
> cu, WMD.
com.sun.tools.classfile is a simple library underpinning javap, and does not
enforce any validity constraints.
The decision where to put annotations attributes is made in javac.
Start in Names.java to find RuntimeVisibleTypeAnnotations (c. line 280)
then track from there to javac.jvm.ClassWriter in writeTypeAnnotations,
then to writeMemberAttrs (line 635).
More information about the type-annotations-dev