public final class Version
extends java.lang.Object
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
.
限定符和类型 | 方法和说明 |
---|---|
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 specified
ClassLoader . |
java.lang.String |
longCommitHash() |
static void |
main(java.lang.String[] args)
Prints the version information to
System.err . |
java.lang.String |
repositoryStatus() |
java.lang.String |
shortCommitHash() |
java.lang.String |
toString() |
public static java.util.Map<java.lang.String,Version> identify()
Map
whose keys are Maven artifact IDs and whose values are Version
spublic static java.util.Map<java.lang.String,Version> identify(java.lang.ClassLoader classLoader)
ClassLoader
.Map
whose keys are Maven artifact IDs and whose values are Version
spublic static void main(java.lang.String[] args)
System.err
.public java.lang.String artifactId()
public java.lang.String artifactVersion()
public long buildTimeMillis()
public long commitTimeMillis()
public java.lang.String shortCommitHash()
public java.lang.String longCommitHash()
public java.lang.String repositoryStatus()
public java.lang.String toString()
toString
在类中 java.lang.Object