<div dir="auto"><span style="font-size:12.8px">I mean reading an existing module-info via ModuleElement, not creating a new one. The module-info I'm trying to read has generated classes in a provided clause.</span></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Aug 25, 2023, 7:15 PM Joseph D. Darcy <<a href="mailto:joe.darcy@oracle.com">joe.darcy@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>
    <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>On 8/25/2023 3:25 PM, Josiah Noel
      wrote:<br>
    </div>
    <blockquote type="cite">
      
      <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">
          <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" rel="noreferrer">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>
  </div>

</blockquote></div>