comparison src/ch/ethz/ssh2/Version.java @ 273:91a31873c42a ganymed

start conversion from trilead to ganymed
author Carl Byington <carl@five-ten-sg.com>
date Fri, 18 Jul 2014 11:21:46 -0700
parents
children 071eccdff8ea
comparison
equal deleted inserted replaced
272:ce2f4e397703 273:91a31873c42a
1 package ch.ethz.ssh2;
2
3 /**
4 * Provides version information from the manifest.
5 *
6 * @version $Id: Version.java 140 2014-04-15 13:16:25Z dkocher@sudo.ch $
7 */
8 public class Version
9 {
10 public static String getSpecification()
11 {
12 Package pkg = Version.class.getPackage();
13 return (pkg == null) ? "SNAPSHOT" : pkg.getSpecificationVersion() == null ? "SNAPSHOT" : pkg.getSpecificationVersion();
14 }
15
16 public static String getImplementation()
17 {
18 Package pkg = Version.class.getPackage();
19 return (pkg == null) ? "SNAPSHOT" : pkg.getImplementationVersion() == null ? "SNAPSHOT" : pkg.getImplementationVersion();
20 }
21
22 /**
23 * A simple main method that prints the version and exits
24 */
25 public static void main(String[] args)
26 {
27 System.out.println("Version: " + getSpecification());
28 System.out.println("Implementation: " + getImplementation());
29 }
30 }