[JSR308] Suggestion (and example) for annotations that take any annotation or for annotation inheritance

Niko Matsakis niko at alum.mit.edu
Fri Oct 3 04:28:45 EDT 2008


> I, and several others, have a need for either annotations that can  
> take any annotation or (preferably) for annotation inheritance.  
> While annotation inheritance is preferred, I understand there may be  
> good reasons this was left out of JSR-175 initially. If annotation  
> inheritance is not possible, having annotations which can take any  
> annotation would at least help.

Agreed, I would also find this very useful.  I just sent a proposal I  
have been drafting which includes annotation inheritance, and also  
discusses the possibility of attaching multiple instances of the same  
annotation to a single declaration.  The basic idea is to permit  
inheritance but disallow "overloading" of properties in subtypes.


regards,
Niko Matsakis




More information about the JSR308 mailing list