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

Add `Elements.isAutomaticModule(ModuleElement)`

XMLWordPrintable

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

      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;
              }
          }

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

              Created:
              Updated:
              Resolved: