@@ -58,63 +58,63 @@ private Manifest(final java.util.jar.Manifest manifest) {
5858
5959 // -- Manifest methods --
6060
61- public String getArchiverVersion () {
61+ public String archiverVersion () {
6262 return get ("Archiver-Version" );
6363 }
6464
65- public String getBuildJdk () {
65+ public String buildJdk () {
6666 return get ("Build-Jdk" );
6767 }
6868
69- public String getBuiltBy () {
69+ public String builtBy () {
7070 return get ("Built-By" );
7171 }
7272
73- public String getCreatedBy () {
73+ public String createdBy () {
7474 return get ("Created-By" );
7575 }
7676
77- public String getImplementationBuild () {
77+ public String implementationBuild () {
7878 return get ("Implementation-Build" );
7979 }
8080
81- public String getImplementationDate () {
81+ public String implementationDate () {
8282 return get ("Implementation-Date" );
8383 }
8484
85- public String getImplementationTitle () {
85+ public String implementationTitle () {
8686 return get ("Implementation-Title" );
8787 }
8888
89- public String getImplementationVendor () {
89+ public String implementationVendor () {
9090 return get ("Implementation-Vendor" );
9191 }
9292
93- public String getImplementationVendorId () {
93+ public String implementationVendorId () {
9494 return get ("Implementation-Vendor-Id" );
9595 }
9696
97- public String getImplementationVersion () {
97+ public String implementationVersion () {
9898 return get ("Implementation-Version" );
9999 }
100100
101- public String getManifestVersion () {
101+ public String manifestVersion () {
102102 return get ("Manifest-Version" );
103103 }
104104
105- public String getPackage () {
105+ public String package_ () {
106106 return get ("Package" );
107107 }
108108
109- public String getSpecificationTitle () {
109+ public String specificationTitle () {
110110 return get ("Specification-Title" );
111111 }
112112
113- public String getSpecificationVendor () {
113+ public String specificationVendor () {
114114 return get ("Specification-Vendor" );
115115 }
116116
117- public String getSpecificationVersion () {
117+ public String specificationVersion () {
118118 return get ("Specification-Version" );
119119 }
120120
@@ -135,9 +135,9 @@ public Map<Object, Object> getAll() {
135135 // -- Utility methods --
136136
137137 /** Gets the JAR manifest associated with the given class. */
138- public static Manifest getManifest (final Class <?> c ) {
138+ public static Manifest manifest (final Class <?> c ) {
139139 try {
140- return getManifest (new URL ("jar:" + Classes .location (c ) + "!/" ));
140+ return manifest (new URL ("jar:" + Classes .location (c ) + "!/" ));
141141 }
142142 catch (final IOException e ) {
143143 return null ;
@@ -148,20 +148,20 @@ public static Manifest getManifest(final Class<?> c) {
148148 * Gets the JAR manifest associated with the given XML document. Assumes the
149149 * XML document was loaded as a resource from inside a JAR.
150150 */
151- public static Manifest getManifest (final XML xml ) throws IOException {
151+ public static Manifest manifest (final XML xml ) throws IOException {
152152 final String path = xml .path ();
153153 if (path == null || !path .startsWith ("file:" )) return null ;
154154 final int dotJAR = path .indexOf (".jar!/" );
155- return getManifest (new File (path .substring (5 , dotJAR + 4 )));
155+ return manifest (new File (path .substring (5 , dotJAR + 4 )));
156156 }
157157
158158 /** Gets the JAR manifest associated with the given JAR file. */
159- public static Manifest getManifest (final File jarFile ) throws IOException {
159+ public static Manifest manifest (final File jarFile ) throws IOException {
160160 if (!jarFile .exists ()) throw new FileNotFoundException ();
161- return getManifest (new URL ("jar:file:" + jarFile .getAbsolutePath () + "!/" ));
161+ return manifest (new URL ("jar:file:" + jarFile .getAbsolutePath () + "!/" ));
162162 }
163163
164- private static Manifest getManifest (final URL jarURL ) throws IOException {
164+ private static Manifest manifest (final URL jarURL ) throws IOException {
165165 final JarURLConnection conn = (JarURLConnection ) jarURL .openConnection ();
166166 return new Manifest (conn .getManifest ());
167167 }
@@ -170,20 +170,19 @@ private static Manifest getManifest(final URL jarURL) throws IOException {
170170
171171 @ Override
172172 public String version () {
173- final String v = getBaseVersion ();
173+ final String v = baseVersion ();
174174 if (v == null || !v .endsWith ("-SNAPSHOT" )) return v ;
175175
176176 // append commit hash to differentiate between development versions
177- final String buildNumber = getImplementationBuild ();
177+ final String buildNumber = implementationBuild ();
178178 return buildNumber == null ? v : v + "-" + buildNumber ;
179179 }
180180
181181 // -- Helper methods --
182182
183- private String getBaseVersion () {
184- final String manifestVersion = getImplementationVersion ();
183+ private String baseVersion () {
184+ final String manifestVersion = implementationVersion ();
185185 if (manifestVersion != null ) return manifestVersion ;
186- return getSpecificationVersion ();
186+ return specificationVersion ();
187187 }
188-
189188}
0 commit comments