Package com.jogamp.common.util
Class VersionUtil
- java.lang.Object
-
- com.jogamp.common.util.VersionUtil
-
public class VersionUtil extends Object
-
-
Constructor Summary
Constructors Constructor Description VersionUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringgetExtensionName(Attributes attributes)Returns the attributes' Attributes.Name.EXTENSION_NAME, i.e.static StringgetExtensionName(Manifest mf)Returns the manifest's Attributes.Name.EXTENSION_NAME, i.e.static StringBuildergetFullManifestInfo(Manifest mf, StringBuilder sb)static ManifestgetManifest(ClassLoader cl, String extension)Returns the manifest of the jar which contains the specified extension.static ManifestgetManifest(ClassLoader cl, String[] extensions)Returns the manifest of the jar which contains one of the specified extensions.static ManifestgetManifest(ClassLoader cl, String[] extensions, boolean acceptFirst)Returns the manifest of the jar which contains one of the specified extensions.static StringgetPlatformInfo()Prints platform info.static StringBuildergetPlatformInfo(StringBuilder sb)Appends environment information like OS, JVM and CPU architecture properties to the StringBuilder.
-
-
-
Field Detail
-
SEPERATOR
public static final String SEPERATOR
- See Also:
- Constant Field Values
-
-
Method Detail
-
getPlatformInfo
public static StringBuilder getPlatformInfo(StringBuilder sb)
Appends environment information like OS, JVM and CPU architecture properties to the StringBuilder.
-
getPlatformInfo
public static String getPlatformInfo()
Prints platform info.- See Also:
getPlatformInfo(java.lang.StringBuilder)
-
getExtensionName
public static String getExtensionName(Manifest mf)
Returns the manifest's Attributes.Name.EXTENSION_NAME, i.e. package-name.
-
getExtensionName
public static String getExtensionName(Attributes attributes)
Returns the attributes' Attributes.Name.EXTENSION_NAME, i.e. package-name.
-
getManifest
public static Manifest getManifest(ClassLoader cl, String extension)
Returns the manifest of the jar which contains the specified extension. The provided ClassLoader is used for resource loading, while excluding its parent-classloader resources.- Parameters:
cl- ClassLoader used to locate the manifest.extension- The value of the 'Extension-Name' jar-manifest attribute; used to identify the manifest.- Returns:
- the requested manifest, or null if not matching or none found.
-
getManifest
public static Manifest getManifest(ClassLoader cl, String[] extensions)
Returns the manifest of the jar which contains one of the specified extensions. The provided ClassLoader is used for resource loading, while excluding its parent-classloader resources.- Parameters:
cl- ClassLoader used to locate 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.- Returns:
- the requested manifest, or null if not matching or none found.
-
getManifest
public static Manifest getManifest(ClassLoader cl, String[] extensions, boolean acceptFirst)
Returns the manifest of the jar which contains one of the specified extensions. The provided ClassLoader is used for resource loading, while excluding its parent-classloader resources.- Parameters:
cl- ClassLoader used to locate 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.acceptFirst- pass true to accept the first Manifest w/ an extension-name if non matching extension is found- Returns:
- the requested manifest, otherwise the first found manifest w/ an extension-name or null when no manifest found.
-
getFullManifestInfo
public static StringBuilder getFullManifestInfo(Manifest mf, StringBuilder sb)
-
-