All available version information is provided in strings, where the string format is informal and subject to change without notice. Version information is provided for debugging output and interpretation by humans, not for automated processing in applications.
| Modifier and Type | Field and Description |
|---|---|
| private static final VersionInfo[] | EMPTY_VERSION_INFO_ARRAY
An empty immutable |
| private final String | infoClassloader
The classloader from which the version info was obtained. |
| private final String | infoModule
The module from the version info. |
| private final String | infoPackage
The package that contains the version information. |
| private final String | infoRelease
The release from the version info. |
| private final String | infoTimestamp
The timestamp from the version info. |
| public static final String | |
| public static final String | |
| public static final String | PROPERTY_TIMESTAMP
Deprecated
This will be removed in 6.0.
|
| public static final String | UNAVAILABLE
A string constant for unavailable information. |
| public static final String | VERSION_PROPERTY_FILE
The filename of the version information files. |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| protected static VersionInfo | Returns: the version informationthe package for the version information pckg, final Map<?, ?> the map from string keys to string values,
for example info, final ClassLoader java.the classloader, or clsldr)nullInstantiates version information from properties. |
| public final String | Returns: the classloader description, nevernullObtains the classloader used to read the version information. |
| public final String | Returns: the module name, nevernullObtains the name of the versioned module or informal unit. |
| public final String | |
| public final String | Returns: the release version, nevernullObtains the release of the versioned module or informal unit. |
| public static String | getSoftwareInfo(final String
the component name, like "Apache-HttpClient". name, final String the package for which to load version information, for example "org.apache.http". The package name
should NOT end with a dot. pkg, final Class<?> the class' class loader to load from, or cls)null for the thread context class loaderGets software information as |
| public final String | Returns: the timestamp, nevernull
Deprecated
This will be removed in 6.0.
Obtains the timestamp of the versioned module or informal unit.
|
| public static VersionInfo[] | Returns: the version information for all packages found, nevernullthe packages for which to load version info pckgs, final ClassLoader the classloader to load from, or
clsldr)null for the thread context classloaderLoads version information for a list of packages. |
| public static VersionInfo | Returns: the version information for the argument package, ornull if not availablethe package for which to load version information,
for example "org.apache.http".
The package name should NOT end with a dot. pckg, final ClassLoader the classloader to load from, or
clsldr)null for the thread context classloaderLoads version information for a package. |
| public String | Returns: a string holding this version informationOverrides java. |
| EMPTY_VERSION_INFO_ARRAY | back to summary |
|---|---|
| private static final VersionInfo[] EMPTY_VERSION_INFO_ARRAY An empty immutable | |
| infoClassloader | back to summary |
|---|---|
| private final String infoClassloader The classloader from which the version info was obtained. | |
| infoModule | back to summary |
|---|---|
| private final String infoModule The module from the version info. | |
| infoPackage | back to summary |
|---|---|
| private final String infoPackage The package that contains the version information. | |
| infoRelease | back to summary |
|---|---|
| private final String infoRelease The release from the version info. | |
| infoTimestamp | back to summary |
|---|---|
| private final String infoTimestamp The timestamp from the version info. | |
| PROPERTY_MODULE | back to summary |
|---|---|
| public static final String PROPERTY_MODULE | |
| PROPERTY_RELEASE | back to summary |
|---|---|
| public static final String PROPERTY_RELEASE | |
| PROPERTY_TIMESTAMP | back to summary |
|---|---|
| public static final String PROPERTY_TIMESTAMP
Deprecated This will be removed in 6.0. | |
| UNAVAILABLE | back to summary |
|---|---|
| public static final String UNAVAILABLE A string constant for unavailable information. | |
| VERSION_PROPERTY_FILE | back to summary |
|---|---|
| public static final String VERSION_PROPERTY_FILE The filename of the version information files. | |
| VersionInfo | back to summary |
|---|---|
| protected VersionInfo(final String pckg, final String module, final String release, final String time, final String clsldr) Instantiates version information. | |
| fromMap | back to summary |
|---|---|
| protected static VersionInfo fromMap(final String pckg, final Map<?, ?> info, final ClassLoader clsldr) Instantiates version information from properties.
| |
| getClassloader | back to summary |
|---|---|
| public final String getClassloader() Obtains the classloader used to read the version information.
This is just the
| |
| getModule | back to summary |
|---|---|
| public final String getModule() Obtains the name of the versioned module or informal unit. This data is read from the version information for the package.
| |
| getPackage | back to summary |
|---|---|
| public final String getPackage() Obtains the package name. The package name identifies the module or informal unit.
| |
| getRelease | back to summary |
|---|---|
| public final String getRelease() Obtains the release of the versioned module or informal unit. This data is read from the version information for the package.
| |
| getSoftwareInfo | back to summary |
|---|---|
| public static String getSoftwareInfo(final String name, final String pkg, final Class<?> cls) Gets software information as For example: "Apache-HttpClient/4.3 (Java/1.6.0_35)"
| |
| getTimestamp | back to summary |
|---|---|
| public final String getTimestamp()
Deprecated This will be removed in 6.0. Obtains the timestamp of the versioned module or informal unit. This data is read from the version information for the package.
| |
| loadVersionInfo | back to summary |
|---|---|
| public static VersionInfo[] loadVersionInfo(final String[] pckgs, final ClassLoader clsldr) Loads version information for a list of packages.
| |
| loadVersionInfo | back to summary |
|---|---|
| public static VersionInfo loadVersionInfo(final String pckg, final ClassLoader clsldr) Loads version information for a package.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Provides the version information in human-readable format. | |