[JSR308] Annotations on type parameters.

Niko Matsakis niko at alum.mit.edu
Wed Oct 15 09:38:13 EDT 2008


Hello,

I noticed that in the current version of javac, it is not legal to  
place annotations on generic type parameters.  For example:

	public class List<@X E> {}

I, personally, would find this useful.  It seems to me very plausible  
that many alternate type system might want to declare annotations on  
generic type parameters, just as they do on other type declarations  
like classes or interfaces.

To that end, I have attached a patch that allows such annotations.   
They can be accessed using the standard Element interface.


Niko



More information about the JSR308 mailing list