<div dir="ltr"><div dir="ltr">On Thu, Feb 16, 2023 at 3:10 PM Alex Buckley <<a href="mailto:alex.buckley@oracle.com">alex.buckley@oracle.com</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Looking at an annotation interface `A`'s @Target meta-annotation <br>
absolutely does tell you all the places that the annotation `@A` may <br>
appear. Everything about this is checked at compile time -- it has to be <br>
deterministic.<br>
<br>
For example, from `@Target(TYPE_USE)`, you can deduce that `@A` may <br>
appear on type uses, on class declarations, on interface declarations, <br>
and on type parameter declarations.<br></blockquote><div><br></div><div>Let me put it a different way: what does annotating my annotation with @Target({ ElementType.TYPE, ElementType.TYPE_PARAMETER, ElementType.TYPE_USE }) accomplish that simply annotating it with @Target({ ElementType.TYPE_USE }) does not?</div><div><br></div><div>Thanks,</div><div>Laird</div></div></div>