< prev index next >

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

Print this page




  31 import java.util.stream.Stream;
  32 
  33 /**
  34  * An Archive of all content, classes, resources, configuration files, and
  35  * other, for a module.
  36  */
  37 public interface Archive {
  38 
  39     /**
  40      * Entry is contained in an Archive
  41      */
  42     public abstract class Entry {
  43 
  44         public static enum EntryType {
  45             MODULE_NAME,
  46             CLASS_OR_RESOURCE,
  47             CONFIG,
  48             NATIVE_LIB,
  49             NATIVE_CMD,
  50             HEADER_FILE,

  51             MAN_PAGE,
  52             SERVICE;
  53         }
  54 
  55         private final String name;
  56         private final EntryType type;
  57         private final Archive archive;
  58         private final String path;
  59 
  60         /**
  61          * Constructs an entry of the given archive
  62          * @param archive archive
  63          * @param path
  64          * @param name an entry name that does not contain the module name
  65          * @param type
  66          */
  67         public Entry(Archive archive, String path, String name, EntryType type) {
  68             this.archive = Objects.requireNonNull(archive);
  69             this.path = Objects.requireNonNull(path);
  70             this.name = Objects.requireNonNull(name);




  31 import java.util.stream.Stream;
  32 
  33 /**
  34  * An Archive of all content, classes, resources, configuration files, and
  35  * other, for a module.
  36  */
  37 public interface Archive {
  38 
  39     /**
  40      * Entry is contained in an Archive
  41      */
  42     public abstract class Entry {
  43 
  44         public static enum EntryType {
  45             MODULE_NAME,
  46             CLASS_OR_RESOURCE,
  47             CONFIG,
  48             NATIVE_LIB,
  49             NATIVE_CMD,
  50             HEADER_FILE,
  51             LEGAL_NOTICE,
  52             MAN_PAGE,
  53             SERVICE;
  54         }
  55 
  56         private final String name;
  57         private final EntryType type;
  58         private final Archive archive;
  59         private final String path;
  60 
  61         /**
  62          * Constructs an entry of the given archive
  63          * @param archive archive
  64          * @param path
  65          * @param name an entry name that does not contain the module name
  66          * @param type
  67          */
  68         public Entry(Archive archive, String path, String name, EntryType type) {
  69             this.archive = Objects.requireNonNull(archive);
  70             this.path = Objects.requireNonNull(path);
  71             this.name = Objects.requireNonNull(name);


< prev index next >