[Checkers] Processing unknown annotations

Matt Papi mpapi at csail.mit.edu
Wed May 28 18:03:11 EDT 2008


The first part looks okay to me. The second part (which is related to
the private mail that Mike sent Mahmood and me; see my response)
should mention that the two annotations are really unrelated, that
@SupportedAnnotationTypes can be ignored, and that @TypeQualifiers is
described in the manual. I can fill that out later, if necessary,
later tonight (I'm about to leave to run some semi-important errands.)

- Matt

>> Is there any support for processing unknown annotations?
>> In my case I want to allow the analysis of user provided annotations.
>
> This is easy enough to do.  The Custom Checker that is distributed with the
> Checker Framework already does this.  For documentation, see
>
>  http://groups.csail.mit.edu/pag/jsr308/current/checkers-manual.html#custom-checker
>
> You can also read its code, which may help you with your task.
>
> (Note:  In the next release, the Custom Checker will be renamed to the
> Basic Checker.)
>
>> I do not have any idea what SupportedAnnotationTypes and TypeQualifiers
>> annotations actually do, so I am concerned if what I want to do is feasible.
>
> javax.annotation.processing.SupportedAnnotationTypes is supplied by Sun,
> and we have not changed its meaning.  Only the listed annotations are
> supplied to the given annotation processor.  If you want your annotation
> processor to be given every annotation in the program, you can write
>  @SupportedAnnotationTypes({"*"})
> (You can also omit the @SupportedAnnotationTypes annotation, but it's
> better style to explicitly state what annotations are supported.)
>
> TypeQualifiers should be a subset of SupportedAnnotationTypes.  The
> argument to TypeQualifiers lists only the type qualifier annotations.  If
> you supply the TypeQualifiers annotation, then it is used to automatically
> build the type qualifier hierarchy.
>
> _______________________________________________
> checkers mailing list
> checkers at lists.csail.mit.edu
> https://lists.csail.mit.edu/mailman/listinfo/checkers
>



More information about the checkers mailing list