308 type variable declarations
Maurizio Cimadamore
Maurizio.Cimadamore at Sun.COM
Tue Feb 24 10:15:52 PST 2009
Hi,
I'd like to discuss about a point that's not 100% clear to me:
In section 2.3 you say that you'll add another enum constant to
ElementType, namely TYPE_USE, which can be used to denote a 'type
annotation', not to be confused with ElementType.TYPE which is used for
annotations to be put on type declaration.
In my opinion this could be misleading, as a type-variable is a
declaration, and not a use - I think there are two logical distinct
parts addressed by this JSR:
1) Allow annotations to be put on every kind of declarations (such as
type-variable decl)
2) Allow annotations on type
For (2) ElementType.TYPE_USE seems fine, while for (1) I think we'd need
a more specific constant, like ElementType.TYPEVAR, in order to be
consistent with what happen with standard annotation types.
What do you think?
Maurizio
More information about the type-annotations-dev
mailing list