public class VersionUtil extends Object
Constructor and Description |
---|
VersionUtil() |
Modifier and Type | Method and Description |
---|---|
static StringBuilder |
getFullManifestInfo(Manifest mf,
StringBuilder sb) |
static Manifest |
getManifest(ClassLoader cl,
String extension)
Returns the manifest of the jar which contains the specified extension.
|
static Manifest |
getManifest(ClassLoader cl,
String[] extensions)
Returns the manifest of the jar which contains one of the specified extensions.
|
static String |
getPlatformInfo()
Prints platform info.
|
static StringBuilder |
getPlatformInfo(StringBuilder sb)
Appends environment information like OS, JVM and CPU architecture properties to the StringBuilder.
|
public static final String SEPERATOR
public static StringBuilder getPlatformInfo(StringBuilder sb)
public static String getPlatformInfo()
public static Manifest getManifest(ClassLoader cl, String extension)
cl
- A ClassLoader which should find the manifest.extension
- The value of the 'Extension-Name' jar-manifest attribute; used to identify the manifest.public static Manifest getManifest(ClassLoader cl, String[] extensions)
cl
- A ClassLoader which should find the manifest.extensions
- The values of many 'Extension-Name's jar-manifest attribute; used to identify the manifest.
Matching is applied in decreasing order, i.e. first element is favored over the second, etc.public static StringBuilder getFullManifestInfo(Manifest mf, StringBuilder sb)