ModuleElement doesn't work with generated provides classes?

Josiah Noel josiahnoel at
Fri Aug 25 22:25:59 UTC 2023

I was able to work around it by using Filer to directly load the file as a string and parse it.

On Fri, Aug 25, 2023 at 1:04 AM Josiah Noel <josiahnoel at> wrote:

> Hello there,
> I'm adding functionality to my annotation processor to check whether a
> generated class is registered on a When I try to use
> `ModuleElement#getDirectives`, I get the `requires` statements, but I
> cannot get the `provides` statements I've written.
> Is it possible to get this to work? Or does the fact that the classes are
> generated totally prevent me from getting the provides statements?
> --
> Cheers, Josiah.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the compiler-dev mailing list