New release of JSR 308 specification

1 view
Skip to first unread message

Michael Ernst

unread,
Nov 25, 2009, 2:53:26 PM11/25/09
to jsr308-discuss
I have released a new version of the JSR 308 specification. (Thanks for
all the useful comments, and keep them coming!)

You can always find the current version at:
http://types.cs.washington.edu/jsr308/specification/java-annotation-design.html
http://types.cs.washington.edu/jsr308/specification/java-annotation-design.pdf

The changelog for the current release appears below.

-Michael Ernst


Changes to normative section:

* Permit annotations on types in throws clause.
* If an annotation has no @Target meta-annotation, then it applies
everywhere, not just the ElementTypes that were supported in Java SE 6.
* Changes to classfile format:
o Change extends/implements from using u1 to u2.
o Rename reference_info to target_info. Introduce names for each
variant.
o Clarify where attributes appear (on what element in the class file).
* Improve discussion of annotations on compiler-generated methods (such as
bridge methods). Cut compiler-specific discussion.
* The grammar summary in Section 2.1 now separates type parameter
declarations from type uses.

Changes to non-normative section:

* Add new section "Annotations on receiver type parameters" as a
potential future extension to the syntax.

Olivier

unread,
Nov 26, 2009, 10:57:38 AM11/26/09
to Type annotations (JSR 308) discussions
Thanks for the new specifications!

On a quick read, section 4.3.5. "An Runtime[In]visibleTypeAnnotations
attribute targeting a method return type lives in the attributes table
of a field_info structure" should be replaced with:
"An Runtime[In]visibleTypeAnnotations attribute targeting a method
return type lives in the attributes table of a method_info structure".
"field_info" is replaced with "method_info".

Also should not the target_info that are empty refers to the
"empty_target" since this is part of the union in the target_info
structure. The specification only refers to "target_info is empty".

Regards,

Olivier

Michael Ernst

unread,
Nov 30, 2009, 12:42:50 PM11/30/09
to jsr308-...@googlegroups.com, thom...@gmail.com
Olivier-

> section 4.3.5. ... "targeting a method return type"
> ... "field_info" is replaced with "method_info".

You are right. Thanks for catching this typo.

> Also should not the target_info that are empty refers to the
> "empty_target" since this is part of the union in the target_info
> structure. The specification only refers to "target_info is empty".

We overlooked that in the edits. I have changed it to be more formal, and
to refer to (and define) empty_target.


Thanks very much for pointing out these problems; we appreciate it!

-Mike
Reply all
Reply to author
Forward
0 new messages