Is a TYPE_USE annotation stored as such in a class file?

Alex Buckley alex.buckley at
Thu Feb 16 22:43:22 UTC 2023

On 2/16/2023 2:33 PM, Laird Nelson wrote:
> On Thu, Feb 16, 2023 at 1:59 PM Liam Miller-Cushon <cushon at 
> <mailto:cushon at>> wrote:
>     I think this is deliberate and covered by
> <>
>         A declaration annotation is ... an annotation that applies to a
>         class, interface, or type parameter declaration, and whose
>         annotation interface is applicable in type contexts
> But @A does not have ElementType.TYPE which is what I take to be the 
> manifestation of “applicable in type contexts”. Maybe I’m wrong?

The annotation interface A has ElementType.TYPE_USE === applicable in 
type contexts (


More information about the compiler-dev mailing list