org.synsoft.base.version
Class VersionFinder
java.lang.Object
|
+--org.synsoft.base.version.VersionFinder
- public class VersionFinder
- extends java.lang.Object
This class provides methods for automating the version checking of Version
compliant classes.
Field Summary |
static Version |
scm_version
Constant instance of version information for class. |
Method Summary |
static boolean |
classHasVersion(java.lang.String className)
|
static boolean |
classHasVersion(java.lang.String className,
boolean bPropagateClassNotFoundException)
Determines whether the named class has an accessible version field constant. |
static int |
compareVersions(Version l,
Version r)
Compares versions |
static Version |
getClassVersion(java.lang.Class c)
Loads the class version for the given class. |
static Version |
getClassVersion(java.lang.String className)
Loads the class version for the named class. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
scm_version
public static final Version scm_version
- Constant instance of version information for class.
VersionFinder
public VersionFinder()
classHasVersion
public static boolean classHasVersion(java.lang.String className,
boolean bPropagateClassNotFoundException)
throws java.lang.ClassNotFoundException
- Determines whether the named class has an accessible version field constant.
- Throws:
java.lang.ClassNotFoundException
- thrown when the class specified cannot be located
classHasVersion
public static boolean classHasVersion(java.lang.String className)
getClassVersion
public static Version getClassVersion(java.lang.String className)
throws java.lang.ClassNotFoundException,
VersionException
- Loads the class version for the named class.
- Returns:
- A reference to a version object
- Throws:
java.lang.ClassNotFoundException
- thrown when the class specified cannot be locatedVersionException
- any other failure conditions- See Also:
Version
getClassVersion
public static Version getClassVersion(java.lang.Class c)
throws java.lang.ClassNotFoundException,
VersionException
- Loads the class version for the given class.
- Returns:
- A reference to a version object
- Throws:
java.lang.ClassNotFoundException
- thrown when the class specified cannot be locatedVersionException
- any other failure conditions- See Also:
Version
compareVersions
public static int compareVersions(Version l,
Version r)
- Compares versions
- Returns:
- <0 if the given version is lower (older) than that of this, 0 if they are equivalent, and >0 if it is higher (newer).
Copyright © Synesis Software. Licensed according to the Synesis Software Standard Public License