< prev index next >

src/jdk.jlink/share/classes/jdk/tools/jlink/internal/AbstractResourcePoolEntry.java

Print this page




  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 jdk.tools.jlink.internal;
  27 
  28 import java.util.Objects;
  29 import jdk.tools.jlink.plugin.ResourcePoolEntry;
  30 
  31 /**
  32  * A LinkResourcePoolEntry is the elementary unit of data inside an image. It is
  33  * generally a file. e.g.: a java class file, a resource file, a shared library,
  34  * ...
  35  * <br>
  36  * A LinkResourcePoolEntry is identified by a path of the form:
  37  * <ul>
  38  * <li>For jimage content: /{module name}/{package1}/.../{packageN}/{file
  39  * name}</li>
  40  * <li>For other files (shared lib, launchers, config, ...):/{module name}/
  41  * {@literal bin|conf|native}/{dir1}>/.../{dirN}/{file name}</li>
  42  * </ul>
  43  */
  44 abstract class AbstractResourcePoolEntry implements ResourcePoolEntry {
  45     private final String path;
  46     private final String module;
  47     private final Type type;
  48 
  49     /**
  50      * Create a new AbstractResourcePoolEntry.
  51      *
  52      * @param module The module name.
  53      * @param path The data path identifier.
  54      * @param type The data type.
  55      */
  56     AbstractResourcePoolEntry(String module, String path, Type type) {
  57         this.module = Objects.requireNonNull(module);
  58         this.path = Objects.requireNonNull(path);
  59         this.type = Objects.requireNonNull(type);
  60     }
  61 




  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 jdk.tools.jlink.internal;
  27 
  28 import java.util.Objects;
  29 import jdk.tools.jlink.plugin.ResourcePoolEntry;
  30 
  31 /**
  32  * A LinkResourcePoolEntry is the elementary unit of data inside an image. It is
  33  * generally a file. e.g.: a java class file, a resource file, a shared library,
  34  * ...
  35  * <br>
  36  * A LinkResourcePoolEntry is identified by a path of the form:
  37  * <ul>
  38  * <li>For jimage content: /{module name}/{package1}/.../{packageN}/{file
  39  * name}</li>
  40  * <li>For other files (shared lib, launchers, config, ...):/{module name}/
  41  * {@literal bin|conf|lib}/{dir1}>/.../{dirN}/{file name}</li>
  42  * </ul>
  43  */
  44 abstract class AbstractResourcePoolEntry implements ResourcePoolEntry {
  45     private final String path;
  46     private final String module;
  47     private final Type type;
  48 
  49     /**
  50      * Create a new AbstractResourcePoolEntry.
  51      *
  52      * @param module The module name.
  53      * @param path The data path identifier.
  54      * @param type The data type.
  55      */
  56     AbstractResourcePoolEntry(String module, String path, Type type) {
  57         this.module = Objects.requireNonNull(module);
  58         this.path = Objects.requireNonNull(path);
  59         this.type = Objects.requireNonNull(type);
  60     }
  61 


< prev index next >