Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8261625

Add `Elements.isAutomaticModule(ModuleElement)`

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Fixed
    • P3
    • 17
    • 16
    • core-libs
    • None

    Description

      javac knows if a module is an automatic module. We should expose that through the Elements class.

      For example:

          public boolean isAutomaticModule(ModuleElement me) {
              if (me == null) {
                  return false; // or throw NPE
              } else {
                  ModuleSymbol msym = (ModuleSymbol) me;
                  return (msym.flags() & Flags.AUTOMATIC_MODULE) != 0;
              }
          }

      Attachments

        Issue Links

          Activity

            People

              darcy Joe Darcy
              jjg Jonathan Gibbons
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: