Package io.netty.util
Class Version
- java.lang.Object
-
- io.netty.util.Version
-
public final class Version extends java.lang.Object
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 specifiedClassLoader
, the currentSecurityManager
.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
artifactId()
java.lang.String
artifactVersion()
long
buildTimeMillis()
long
commitTimeMillis()
static java.util.Map<java.lang.String,Version>
identify()
Retrieves the version information of Netty artifacts using the current context class loader.static java.util.Map<java.lang.String,Version>
identify(java.lang.ClassLoader classLoader)
Retrieves the version information of Netty artifacts using the specifiedClassLoader
.java.lang.String
longCommitHash()
static void
main(java.lang.String[] args)
Prints the version information toSystem.err
.java.lang.String
repositoryStatus()
java.lang.String
shortCommitHash()
java.lang.String
toString()
-
-
-
Method Detail
-
identify
public static java.util.Map<java.lang.String,Version> identify()
Retrieves the version information of Netty artifacts using the current context class loader.- Returns:
- A
Map
whose keys are Maven artifact IDs and whose values areVersion
s
-
identify
public static java.util.Map<java.lang.String,Version> identify(java.lang.ClassLoader classLoader)
Retrieves the version information of Netty artifacts using the specifiedClassLoader
.- Returns:
- A
Map
whose keys are Maven artifact IDs and whose values areVersion
s
-
main
public static void main(java.lang.String[] args)
Prints the version information toSystem.err
.
-
artifactId
public java.lang.String artifactId()
-
artifactVersion
public java.lang.String artifactVersion()
-
buildTimeMillis
public long buildTimeMillis()
-
commitTimeMillis
public long commitTimeMillis()
-
shortCommitHash
public java.lang.String shortCommitHash()
-
longCommitHash
public java.lang.String longCommitHash()
-
repositoryStatus
public java.lang.String repositoryStatus()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-