Mercurial > 510Connectbot
comparison app/src/main/java/ch/ethz/ssh2/Version.java @ 438:d29cce60f393
migrate from Eclipse to Android Studio
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Thu, 03 Dec 2015 11:23:55 -0800 |
parents | src/ch/ethz/ssh2/Version.java@071eccdff8ea |
children |
comparison
equal
deleted
inserted
replaced
437:208b31032318 | 438:d29cce60f393 |
---|---|
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 public static String getSpecification() { | |
10 Package pkg = Version.class.getPackage(); | |
11 return (pkg == null) ? "SNAPSHOT" : pkg.getSpecificationVersion() == null ? "SNAPSHOT" : pkg.getSpecificationVersion(); | |
12 } | |
13 | |
14 public static String getImplementation() { | |
15 Package pkg = Version.class.getPackage(); | |
16 return (pkg == null) ? "SNAPSHOT" : pkg.getImplementationVersion() == null ? "SNAPSHOT" : pkg.getImplementationVersion(); | |
17 } | |
18 | |
19 /** | |
20 * A simple main method that prints the version and exits | |
21 */ | |
22 public static void main(String[] args) { | |
23 System.out.println("Version: " + getSpecification()); | |
24 System.out.println("Implementation: " + getImplementation()); | |
25 } | |
26 } |