• R/O
  • SSH
  • HTTPS

exewrap: Commit


Commit MetaInfo

Revision29 (tree)
Time2015-10-04 11:47:22
Authorhirukawa_ryo

Log Message

v1.1.2 *パッケージのspecTitle,specVersion,specVendor,implTitle,implVersion,implVendorをマニフェストファイルから設定するようにしました。

Change Summary

Incremental Difference

--- exewrap/trunk/exewrap/src/java/exewrap/core/ExewrapClassLoader.java (revision 28)
+++ exewrap/trunk/exewrap/src/java/exewrap/core/ExewrapClassLoader.java (revision 29)
@@ -21,6 +21,12 @@
2121 private Queue<JarInputStream> inputs = new LinkedList<JarInputStream>();
2222 private JarInputStream in;
2323 private String mainClassName;
24+ private String specTitle;
25+ private String specVersion;
26+ private String specVendor;
27+ private String implTitle;
28+ private String implVersion;
29+ private String implVendor;
2430 private URL context;
2531
2632 public ExewrapClassLoader(ClassLoader parent, JarInputStream[] inputs) throws MalformedURLException {
@@ -29,6 +35,12 @@
2935 Manifest manifest = in.getManifest();
3036 if(manifest != null) {
3137 this.mainClassName = manifest.getMainAttributes().getValue(Name.MAIN_CLASS);
38+ this.specTitle = manifest.getMainAttributes().getValue(Name.SPECIFICATION_TITLE);
39+ this.specVersion = manifest.getMainAttributes().getValue(Name.SPECIFICATION_VERSION);
40+ this.specVendor = manifest.getMainAttributes().getValue(Name.SPECIFICATION_VENDOR);
41+ this.implTitle = manifest.getMainAttributes().getValue(Name.IMPLEMENTATION_TITLE);
42+ this.implVersion = manifest.getMainAttributes().getValue(Name.IMPLEMENTATION_VERSION);
43+ this.implVendor = manifest.getMainAttributes().getValue(Name.IMPLEMENTATION_VENDOR);
3244 }
3345 this.inputs.offer(in);
3446 }
@@ -106,7 +118,10 @@
106118 if(name.indexOf('.') >= 0) {
107119 String packageName = name.substring(0, name.lastIndexOf('.'));
108120 if(getPackage(packageName) == null) {
109- definePackage(packageName, null, null, null, null, null, null, null);
121+ definePackage(packageName,
122+ specTitle, specVersion, specVendor,
123+ implTitle, implVersion, implVendor,
124+ null);
110125 }
111126 }
112127 return defineClass(name, bytes, 0, bytes.length);
Show on old repository browser