Top Description Fields Constructors Methods
io.netty.util

public final Class Version

extends Object
Class Inheritance
Imports
io.netty.util.internal.PlatformDependent, java.io.InputStream, java.net.URL, java.text.ParseException, .SimpleDateFormat, java.util.Enumeration, .HashSet, .Map, .Properties, .Set, .TreeMap

Retrieves the version information of available Netty artifacts.

This class retrieves the version information from META-INF/io.netty.versions.properties, which is generated in build time. Note that it may not be possible to retrieve the information completely, depending on your environment, such as the specified ClassLoader, the current SecurityManager.

Field Summary

Modifier and TypeField and Description
private final String
private final String
private final long
private final long
private final String
private static final String
private static final String
private static final String
private static final String
private static final String
private static final String
private final String
private final String

Constructor Summary

AccessConstructor and Description
private
Version(String artifactId, String artifactVersion, long buildTimeMillis, long commitTimeMillis, String shortCommitHash, String longCommitHash, String repositoryStatus)

Method Summary

Modifier and TypeMethod and Description
public String
public String
public long
public long
public static Map<String, Version>

Returns:

A Map whose keys are Maven artifact IDs and whose values are Versions
identify
()

Retrieves the version information of Netty artifacts using the current context class loader.

public static Map<String, Version>

Returns:

A Map whose keys are Maven artifact IDs and whose values are Versions
identify
(ClassLoader classLoader)

Retrieves the version information of Netty artifacts using the specified ClassLoader.

public String
public static void
main(String[] args)

Prints the version information to System#err.

private static long
public String
public String
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

artifactIdback to summary
private final String artifactId
artifactVersionback to summary
private final String artifactVersion
buildTimeMillisback to summary
private final long buildTimeMillis
commitTimeMillisback to summary
private final long commitTimeMillis
longCommitHashback to summary
private final String longCommitHash
PROP_BUILD_DATEback to summary
private static final String PROP_BUILD_DATE
PROP_COMMIT_DATEback to summary
private static final String PROP_COMMIT_DATE
PROP_LONG_COMMIT_HASHback to summary
private static final String PROP_LONG_COMMIT_HASH
PROP_REPO_STATUSback to summary
private static final String PROP_REPO_STATUS
PROP_SHORT_COMMIT_HASHback to summary
private static final String PROP_SHORT_COMMIT_HASH
PROP_VERSIONback to summary
private static final String PROP_VERSION
repositoryStatusback to summary
private final String repositoryStatus
shortCommitHashback to summary
private final String shortCommitHash

Constructor Detail

Versionback to summary
private Version(String artifactId, String artifactVersion, long buildTimeMillis, long commitTimeMillis, String shortCommitHash, String longCommitHash, String repositoryStatus)

Method Detail

artifactIdback to summary
public String artifactId()
artifactVersionback to summary
public String artifactVersion()
buildTimeMillisback to summary
public long buildTimeMillis()
commitTimeMillisback to summary
public long commitTimeMillis()
identifyback to summary
public static Map<String, Version> identify()

Retrieves the version information of Netty artifacts using the current context class loader.

Returns:Map<String, Version>

A Map whose keys are Maven artifact IDs and whose values are Versions

identifyback to summary
public static Map<String, Version> identify(ClassLoader classLoader)

Retrieves the version information of Netty artifacts using the specified ClassLoader.

Returns:Map<String, Version>

A Map whose keys are Maven artifact IDs and whose values are Versions

longCommitHashback to summary
public String longCommitHash()
mainback to summary
public static void main(String[] args)

Prints the version information to System#err.

parseIso8601back to summary
private static long parseIso8601(String value)
repositoryStatusback to summary
public String repositoryStatus()
shortCommitHashback to summary
public String shortCommitHash()
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object

Annotations
@Override