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

Add `Elements.isAutomaticModule(ModuleElement)`

    XMLWordPrintable

Details

    • CSR
    • Status: Closed
    • P3
    • Resolution: Approved
    • 17
    • core-libs
    • None
    • source
    • minimal
    • Typical use of default methods to add a method to an interface.
    • Java API
    • SE

    Description

      Summary

      Add a convenience predicate to javax.lang.model.util.Elements to test for automatic modules.

      Problem

      No API in javax.lang.model to determine of a module is automatic or not.

      Solution

      Add a method providing the functionality in question.

      Specification

      New method added to javax.lang.model.util.Elements:

      /**
       * {@return {@code true} if the module element is an automatic
       * module, {@code false} otherwise}
       *
       * @implSpec
       * The default implementation of this method returns {@code
       * false}.
       *
       * @param module the module element being examined
       * @jls 7.7.1 Dependences
       * @since 17
       */
      default boolean isAutomaticModule(ModuleElement module)

      Attachments

        Issue Links

          Activity

            People

              darcy Joe Darcy
              jjg Jonathan Gibbons
              Vicente Arturo Romero Zaldivar
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: