src/share/classes/sun/module/repository/URLModuleInfo.java

Print this page




  43     String arch;
  44     String path;
  45 
  46     /**
  47      * Having this constructor restricts its use to subclasses in this package,
  48      * specifically to {@code MetadataXMLReader.MutableURLModuleInfo}.
  49      **/
  50     URLModuleInfo() { }
  51 
  52     URLModuleInfo(URLModuleInfo other) {
  53         this.name = other.name;
  54         this.version = other.version;
  55         this.platform = other.platform;
  56         this.arch = other.arch;
  57         this.path = other.path;
  58     }
  59 
  60     URLModuleInfo(String name, Version version, String platform, String arch, String path) {
  61         if ((platform == null ^ arch == null)) {
  62             throw new IllegalArgumentException(
  63                 "module platform and name must be either both provided, or neither provided");
  64         }
  65 
  66         if (name == null) {
  67             throw new IllegalArgumentException(
  68                 "name must not be null");
  69         }
  70 
  71         if (version == null) {
  72             throw new IllegalArgumentException(
  73                 "version must not be null");
  74         }
  75 
  76         this.name = name;
  77         this.version = version;
  78         this.platform = platform;
  79         this.arch = arch;
  80         this.path = path;
  81     }
  82 
  83     URLModuleInfo(ModuleArchiveInfo mai) {




  43     String arch;
  44     String path;
  45 
  46     /**
  47      * Having this constructor restricts its use to subclasses in this package,
  48      * specifically to {@code MetadataXMLReader.MutableURLModuleInfo}.
  49      **/
  50     URLModuleInfo() { }
  51 
  52     URLModuleInfo(URLModuleInfo other) {
  53         this.name = other.name;
  54         this.version = other.version;
  55         this.platform = other.platform;
  56         this.arch = other.arch;
  57         this.path = other.path;
  58     }
  59 
  60     URLModuleInfo(String name, Version version, String platform, String arch, String path) {
  61         if ((platform == null ^ arch == null)) {
  62             throw new IllegalArgumentException(
  63                 "module platform and arch must be either both provided, or neither provided");
  64         }
  65 
  66         if (name == null) {
  67             throw new IllegalArgumentException(
  68                 "name must not be null");
  69         }
  70 
  71         if (version == null) {
  72             throw new IllegalArgumentException(
  73                 "version must not be null");
  74         }
  75 
  76         this.name = name;
  77         this.version = version;
  78         this.platform = platform;
  79         this.arch = arch;
  80         this.path = path;
  81     }
  82 
  83     URLModuleInfo(ModuleArchiveInfo mai) {