[Checkers] Spec Q about annotation targets

Mahmood Ali mahmood at MIT.EDU
Mon Dec 15 17:40:33 EST 2008


Greetings Mike,

I wanted to clarify the spec of ElementType.TYPE_USE.  Can you confirm  
the following statement:

1.
An annotation that is meta-annotated with @Target(TYPE_USE) may appear  
on uses of a type, including type/method/variable declarations which  
contain uses of a type, e.g. such annotation does not need to specify  
TYPE, METHOD, FIELDS as possible Targets.

2.
An annotation that is meta-annotated with @Target(TYPE_USE) may not  
appear on
a. constructors, as they have no return types (and may appear on their  
receivers);
b. packages, as they are don't contain a type declaration

3.
An annotation that is meta-annotated with @Target(TYPE_USE) may not  
appear on a void method, as they return nothing.

You might like to address these issues in the specification file  
directly.

Regards,
Mahmood




More information about the checkers mailing list