`Elements.getAllAnnotationMirrors` clarification?
Josiah Noel
josiahnoel at gmail.com
Tue Apr 29 03:47:37 UTC 2025
I see, thanks for the clarification.
On Mon, Apr 28, 2025, 11:45 PM Chen Liang <chen.l.liang at oracle.com> wrote:
> Hi Josiah,
> 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.
>
> Regards, Chen
> ------------------------------
> *From:* compiler-dev <compiler-dev-retn at openjdk.org> on behalf of Josiah
> Noel <josiahnoel at gmail.com>
> *Sent:* Monday, April 28, 2025 10:15 PM
> *To:* compiler-dev at openjdk.org <compiler-dev at openjdk.org>
> *Subject:* `Elements.getAllAnnotationMirrors` clarification?
>
> Hey team,
>
> 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?
>
> 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?
>
> --
> Cheers, Josiah.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/compiler-dev/attachments/20250428/90a07661/attachment.htm>
More information about the compiler-dev
mailing list