<p dir="ltr">I see, thanks for the clarification.</p>
<br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Mon, Apr 28, 2025, 11:45 PM Chen Liang <<a href="mailto:chen.l.liang@oracle.com">chen.l.liang@oracle.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">
<div style="font-family:"Calibri Light","Helvetica Light",sans-serif;font-size:12pt;color:rgb(0,0,0)">
Hi Josiah,</div>
<div style="font-family:"Calibri Light","Helvetica Light",sans-serif;font-size:12pt;color:rgb(0,0,0)">
I think annotation inheritance only applies to superclasses and nothing else, not even superinterfaces - and inherited annotations must have their interfaces annotated @Inherited. This is according to the documentation on the @Inherited annotation interface.</div>
<div style="font-family:"Calibri Light","Helvetica Light",sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:"Calibri Light","Helvetica Light",sans-serif;font-size:12pt;color:rgb(0,0,0)">
Regards, Chen</div>
<div id="m_4197890018303793181appendonsend"></div>
<hr style="display:inline-block;width:98%">
<div id="m_4197890018303793181divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> compiler-dev <<a href="mailto:compiler-dev-retn@openjdk.org" target="_blank" rel="noreferrer">compiler-dev-retn@openjdk.org</a>> on behalf of Josiah Noel <<a href="mailto:josiahnoel@gmail.com" target="_blank" rel="noreferrer">josiahnoel@gmail.com</a>><br>
<b>Sent:</b> Monday, April 28, 2025 10:15 PM<br>
<b>To:</b> <a href="mailto:compiler-dev@openjdk.org" target="_blank" rel="noreferrer">compiler-dev@openjdk.org</a> <<a href="mailto:compiler-dev@openjdk.org" target="_blank" rel="noreferrer">compiler-dev@openjdk.org</a>><br>
<b>Subject:</b> `Elements.getAllAnnotationMirrors` clarification?</font>
<div> </div>
</div>
<div>
<div dir="ltr">
<div dir="ltr">
<div>Hey team,</div>
<div><br>
</div>
<div>Reading the Javadoc for Elements.getAllAnnotationMirrors, I got the impression that this method should include mirrors from super methods when given an executable element or mirrors from super classes when given a type element. Is this not the case?</div>
<div><br>
</div>
<div>I was trying both of these, but the result didn't appear to be any different than Element. getAnnotationMirrors(). In what situation does Elements.getAllAnnotationMirrors give a different result?</div>
<div><br>
</div>
<span>-- </span><br>
<div dir="ltr" data-smartmail="gmail_signature">
<div dir="ltr">Cheers, Josiah.</div>
</div>
<input name="x_virtru-metadata" type="hidden" value="{"email-policy":{"disableCopyPaste":false,"disablePrint":false,"disableForwarding":false,"enableNoauth":false,"expandedWatermarking":false,"expires":false,"sms":false,"expirationNum":1,"expirationUnit":"days","isManaged":false,"persistentProtection":false},"attachments":{},"compose-id":"1","compose-window":{"secure":false}}"></div>
</div>
</div>
</div>
</blockquote></div>