public final class VersionUtil extends Object
| 限定符和类型 | 类和说明 |
|---|---|
static class |
VersionUtil.Version
class Version for compare
https://stackoverflow.com/questions/198431/how-do-you-compare-two-version-strings-in-java
|
| 构造器和说明 |
|---|
VersionUtil() |
| 限定符和类型 | 方法和说明 |
|---|---|
static void |
check(VersionUtil.Version version,
String begin,
String end,
String component)
Check whether a component version is matched expected range,
throw an exception if it's not matched.
|
static String |
getImplementationVersion(Class<?> clazz)
Get implementation version from manifest in jar
|
static boolean |
match(VersionUtil.Version version,
String begin,
String end)
Compare if a version is inside a range [begin, end)
|
public static boolean match(VersionUtil.Version version, String begin, String end)
version - The version to be comparedbegin - The lower bound of the rangeend - The upper bound of the rangepublic static void check(VersionUtil.Version version, String begin, String end, String component)
version - The version to be checkedbegin - The lower bound of the rangeend - The upper bound of the rangecomponent - The owner component of versionCopyright © 2018. All rights reserved.