PROPOSAL: Method and Field Literals

Schulz, Stefan schulz at
Thu Mar 12 02:55:23 PDT 2009

Bruce wrote:
> If that line of reasoning is followed (and I agree it is 
> worth pursuing) then
> the proposal would then be incomplete if you did not extend 
> it to cover type
> literals as well, both as type literals per se and allowing 
> them as annotation
> element values. Currently class literals cannot represent 
> instantiations of a
> generic type. If we allow field and method literals of 
> generic types, but don't
> address the lack of a generic type literal, we haven't gone 
> far enough.

Isn't this rather something to complement reification of generic types? I think this is out of scope for the given proposal, but maybe I am wrong and it's just a snap.

> Following that line of reasoning, and that the type literal 
> doesn't have a
> obvious place to put the # consistently with field and method 
> literals, maybe
> the solution is to use # in a bounding form like these
> #ArrayList<String>#
> #PrintWriter.out#
> #ArrayList<String>.add(String)#

Well, one could reuse the class keyword:


More information about the coin-dev mailing list