< prev index next >

src/java.base/share/classes/java/lang/module/ResolvedModule.java

Print this page




  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package java.lang.module;
  27 
  28 import java.util.Objects;
  29 import java.util.Set;
  30 
  31 /**
  32  * A module in a graph of <em>resolved modules</em>.
  33  *
  34  * <p> {@code ResolvedModule} defines the {@link #configuration configuration}
  35  * method to get the configuration that the resolved module is in. It defines
  36  * the {@link #reference() reference} method to get the reference to the
  37  * module's content.
  38  *
  39  * @since 9

  40  * @see Configuration#modules()
  41  */
  42 public final class ResolvedModule {
  43 
  44     private final Configuration cf;
  45     private final ModuleReference mref;
  46 
  47     ResolvedModule(Configuration cf, ModuleReference mref) {
  48         this.cf = Objects.requireNonNull(cf);
  49         this.mref = Objects.requireNonNull(mref);
  50     }
  51 
  52     /**
  53      * Returns the configuration that this resolved module is in.
  54      *
  55      * @return The configuration that this resolved module is in
  56      */
  57     public Configuration configuration() {
  58         return cf;
  59     }




  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package java.lang.module;
  27 
  28 import java.util.Objects;
  29 import java.util.Set;
  30 
  31 /**
  32  * A module in a graph of <em>resolved modules</em>.
  33  *
  34  * <p> {@code ResolvedModule} defines the {@link #configuration configuration}
  35  * method to get the configuration that the resolved module is in. It defines
  36  * the {@link #reference() reference} method to get the reference to the
  37  * module's content.
  38  *
  39  * @since 9
  40  * @spec JPMS
  41  * @see Configuration#modules()
  42  */
  43 public final class ResolvedModule {
  44 
  45     private final Configuration cf;
  46     private final ModuleReference mref;
  47 
  48     ResolvedModule(Configuration cf, ModuleReference mref) {
  49         this.cf = Objects.requireNonNull(cf);
  50         this.mref = Objects.requireNonNull(mref);
  51     }
  52 
  53     /**
  54      * Returns the configuration that this resolved module is in.
  55      *
  56      * @return The configuration that this resolved module is in
  57      */
  58     public Configuration configuration() {
  59         return cf;
  60     }


< prev index next >