public class Version
extends java.lang.Object
The version information is stored in the base.version
file.
Modifier and Type | Field and Description |
---|---|
private static int |
build |
private static int |
maintenance |
private static int |
major |
private static int |
minor |
private static java.lang.String |
suffix |
Constructor and Description |
---|
Version() |
Modifier and Type | Method and Description |
---|---|
static int |
compareWith(java.lang.String version)
Compare the given version string, which should be of the
form a.b or a.b.c, with the current BASE version.
|
static int |
getBuild()
Get the build version.
|
static int |
getMaintenance()
Get the maintentance version.
|
static int |
getMajor()
Get the major version.
|
static int |
getMinor()
Get the minor version.
|
static java.lang.String |
getSuffix()
Get the version suffix string (eg "-dev" for development versions)
|
static java.lang.String |
getVersion() |
(package private) static void |
init()
Loads the settings from the configuration file.
|
private static int |
parseBuildNumber(java.lang.String buildNumber)
Find the first digits in a string and return those as the build number.
|
private static int major
private static int minor
private static int maintenance
private static int build
private static java.lang.String suffix
static void init() throws ConfigurationException
ConfigurationException
- This exception is thrown if the
configuration settings cannot be loadedpublic static int getMajor()
public static int getMinor()
public static int getMaintenance()
public static int getBuild()
public static java.lang.String getSuffix()
public static java.lang.String getVersion()
public static int compareWith(java.lang.String version)
InvalidDataException
- If the given string isn't correctly formattedprivate static int parseBuildNumber(java.lang.String buildNumber)