|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.fasterxml.jackson.core.util.VersionUtil
public class VersionUtil
Functionality for supporting exposing of component Versions.
Note that this class can be used in two roles: first, as a static utility class for loading purposes, and second, as a singleton loader of per-module version information. In latter case one must sub-class to get proper per-module instance; and sub-class must reside in same Java package as matching "VERSION.txt" file.
| Field Summary | |
|---|---|
static String |
VERSION_FILE
|
| Constructor Summary | |
|---|---|
protected |
VersionUtil()
|
| Method Summary | |
|---|---|
static Version |
mavenVersionFor(ClassLoader classLoader,
String groupId,
String artifactId)
Will attempt to load the maven version for the given groupId and artifactId. |
static Version |
parseVersion(String versionStr)
Deprecated. |
static Version |
parseVersion(String versionStr,
String groupId,
String artifactId)
|
protected static int |
parseVersionPart(String partStr)
|
Version |
version()
|
static Version |
versionFor(Class<?> cls)
Helper method that will try to load version information for specified class. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String VERSION_FILE
| Constructor Detail |
|---|
protected VersionUtil()
| Method Detail |
|---|
public Version version()
public static Version versionFor(Class<?> cls)
Version.unknownVersion() is
returned.
public static Version mavenVersionFor(ClassLoader classLoader,
String groupId,
String artifactId)
classLoader - the ClassLoader to load the pom.properties file fromgroupId - the groupId of the libraryartifactId - the artifactId of the library
@Deprecated public static Version parseVersion(String versionStr)
public static Version parseVersion(String versionStr,
String groupId,
String artifactId)
protected static int parseVersionPart(String partStr)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||