<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<p>Hello,</p>
<p>From your description, I'm not entirely clear of the compilation
context you're working in. Note that by design the annotation
processing API does not support the creation of module-info files
via the Filer.</p>
<p>Cheers,<br>
</p>
<p>-Joe<br>
</p>
<div class="moz-cite-prefix">On 8/25/2023 3:25 PM, Josiah Noel
wrote:<br>
</div>
<blockquote type="cite" cite="mid:CAJ_t5UYRFj087CUzWDTUUUYqRWku+Onk1qyetdsEPb8YZhSbTw@mail.gmail.com">
<div dir="ltr">
<div dir="ltr">I was able to work around it by using Filer to
directly load the module-info.java file as a string and parse
it.<input name="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>
<br>
<div class="gmail_quote" style="">
<div dir="ltr" class="gmail_attr">On Fri, Aug 25, 2023 at
1:04 AM Josiah Noel <<a href="mailto:josiahnoel@gmail.com" target="_blank" moz-do-not-send="true" class="moz-txt-link-freetext">josiahnoel@gmail.com</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">
<div dir="ltr">Hello there,
<div><br>
</div>
<div>I'm adding functionality to my annotation processor
to check whether a generated class is registered on a
module-info.java. When I try to use
`ModuleElement#getDirectives`, I get the `requires`
statements, but I cannot get the `provides` statements
I've written.</div>
<div><br>
</div>
<div>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?<br clear="all">
<div><br>
</div>
<span class="gmail_signature_prefix">-- </span><br>
<div dir="ltr" class="gmail_signature">
<div dir="ltr">Cheers, Josiah.</div>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</blockquote>
</body>
</html>