Provides access to version information for HTTP components. More...
Instances of this class provide version information for a single module or informal unit, as explained here. Static methods are used to extract version information from property files that are automatically packaged with HTTP component release JARs.
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.
The following notice applies to the original API on which this API is based, and to its documentation. The documentation of this API has been revised from the original.
/* * Copyright (C) 2006 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */
Public Member Functions | |
final String | getPackage () |
Obtains the package name. More... | |
final String | getModule () |
Obtains the name of the versioned module or informal unit. More... | |
final String | getRelease () |
Obtains the release of the versioned module or informal unit. More... | |
final String | getTimestamp () |
Obtains the timestamp of the versioned module or informal unit. More... | |
final String | getClassloader () |
Obtains the classloader used to read the version information. More... | |
String | toString () |
Provides the version information in human-readable format. More... | |
Static Public Member Functions | |
static final VersionInfo[] | loadVersionInfo (String[] pckgs, ClassLoader clsldr) |
Loads version information for a list of packages. More... | |
static final VersionInfo | loadVersionInfo (final String pckg, ClassLoader clsldr) |
Loads version information for a package. More... | |
Static Public Attributes | |
static final String | UNAVAILABLE = "UNAVAILABLE" |
A string constant for unavailable information. More... | |
static final String | VERSION_PROPERTY_FILE = "version.properties" |
The filename of the version information files. More... | |
Protected Member Functions | |
VersionInfo (String pckg, String module, String release, String time, String clsldr) | |
Instantiates version information. More... | |
Static Protected Member Functions | |
static final VersionInfo | fromMap (String pckg, Map info, ClassLoader clsldr) |
Instantiates version information from properties. More... | |
|
protected |
pckg | the package |
module | the module, or null |
release | the release, or null |
time | the build time, or null |
clsldr | the class loader, or null |
final String getPackage | ( | ) |
The package name identifies the module or informal unit.
null
final String getModule | ( | ) |
This data is read from the version information for the package.
null
final String getRelease | ( | ) |
This data is read from the version information for the package.
null
final String getTimestamp | ( | ) |
This data is read from the version information for the package.
null
final String getClassloader | ( | ) |
This is just the toString
output of the classloader, since the version information should not keep a reference to the classloader itself. That could prevent garbage collection.
null
String toString | ( | ) |
|
static |
pckgs | the packages for which to load version info |
clsldr | the classloader to load from, or null for the thread context classloader |
null
|
static |
pckg | the package for which to load version information, for example "org.apache.http". The package name should NOT end with a dot. |
clsldr | the classloader to load from, or null for the thread context classloader |
null
if not available
|
staticprotected |
pckg | the package for the version information |
info | the map from string keys to string values, for example java.util.Properties |
clsldr | the classloader, or null |
|
static |
|
static |