Relates :
|
|
Relates :
|
|
Relates :
|
JSR-308 brings annotation on type use (as opposed to annotations on type declarations only that we have today). From the spec: "JSR 308 introduces two new attributes: RuntimeVisibleTypeAnnotations and RuntimeInvisibleTypeAnnotations. These attributes are structurally identical to the RuntimeVisibleAnnotations and RuntimeInvisibleAnnotations attributes described above with one exception: rather than an array of annotation elements, RuntimeVisibleTypeAnnotations and RuntimeInvisibleTypeAnnotations contain an array of type_annotation elements, which are described in Section 3.1. Runtime[In]VisibleTypeAnnotations_attribute { u2 attribute_name_index; // "Runtime[In]VisibleTypeAnnotation" u2 attribute_length; u2 num_annotations; type_annotation annotations[num_annotations]; } A type annotation is stored in a Runtime[In]visibleTypeAnnotations attribute on the smallest enclosing class, field, or method." We need to add support in the VM for storing those TypeAnnotation attributes, and send them to Java-land to be parsed.