[Checkers] Spec Q about annotation targets

Michael Ernst mernst at cs.washington.edu
Mon Dec 15 19:25:48 EST 2008


Mahmood-

You are correct on all points.  I'll update the specification accordingly.

                     Thanks,

                    -Mike


> 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