RetentionPolicy.CLASS too broad for TYPE_USE annotations ?
Alex Buckley
alex.buckley at oracle.com
Tue Oct 15 10:58:46 PDT 2013
Markus' mail went unanswered because it was sent to a list that the EG
does not generally follow. From the listinfo page for
type-annotations-spec-observers:
"Members of the JSR 308 Expert Group are not required to follow traffic
on this list. Questions for the Expert Group about the design and
specification of JSR 308 may be sent to the
type-annotations-spec-comments list."
Markus suggested that TYPE_USE annotations which appear on types in
expressions (e.g. 'instanceof @Foo String') should not be stored in the
class file if the annotation's own type was RetentionPolicy.CLASS (or
presumably RetentionPolicy.RUNTIME). Markus suggested that expression
locations be excluded from RetentionPolicy.CLASS/RUNTIME, then either be
given their own RetentionPolicy enum constant or be flagged for class
file storage via compiler-specific flags (c.f. -parameters).
That's an interesting idea but at this point I'm afraid it's too late to
consider.
Alex
On 10/14/2013 10:55 PM, Srikanth S Adayapalam wrote:
> Dear EG,
>
> AFAICT, this issue raised by Markus Keller in the observer's list:
> http://mail.openjdk.java.net/pipermail/type-annotations-spec-observers/2013-July/000172.html
>
> has gone unanswered.
>
> This raises concerns about class file bloat and needs attention.
>
> If this was indeed discussed and I missed it somehow, appreciate pointers.
>
> Thanks!
> Srikanth
>
More information about the type-annotations-spec-experts
mailing list