Should @SupportedAnnotationTypes handle TYPE_USE?

joe darcy joe.darcy at oracle.com
Tue Sep 25 03:07:20 UTC 2018


Hi Bernard,


On 9/24/2018 3:05 PM, B. Blaser wrote:
> Hi,
>
> I noted that the annotation processor [1] isn't run if
> @SupportedAnnotationTypes ({"TA"}) is used instead of ({"*"}) because
> annotations on TYPE_USE don't seem to be handled when selecting
> processors.
>
> Is this normal or should we add something like below (to be completed)?
> The documentation [2] isn't clear about that.

The documentation of the Processor interface covers this situation:

" Annotations on type uses, as opposed to annotations on elements, are 
ignored when computing whether or not an annotation type is present."
https://docs.oracle.com/javase/10/docs/api/javax/annotation/processing/Processor.html

HTH,

-Joe



More information about the compiler-dev mailing list