Package io.netty.util
Class Version
- java.lang.Object
-
- io.netty.util.Version
-
public final class Version extends java.lang.ObjectRetrieves 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.StringartifactId()java.lang.StringartifactVersion()longbuildTimeMillis()longcommitTimeMillis()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.StringlongCommitHash()static voidmain(java.lang.String[] args)Prints the version information toSystem.err.java.lang.StringrepositoryStatus()java.lang.StringshortCommitHash()java.lang.StringtoString()
-
-
-
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
Mapwhose keys are Maven artifact IDs and whose values areVersions
-
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
Mapwhose keys are Maven artifact IDs and whose values areVersions
-
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:
toStringin classjava.lang.Object
-
-