public final class VersionUtil extends Object
| Modifier and Type | Method and Description |
|---|---|
static String |
determineBundleNameFromJarManifest(String aJarFilePattern,
String aPackage)
Returns the title of the jar file the class is loaded from.
|
static String |
determineBundleVersionFromJarManifest(String aJarFilePattern,
String aPackage)
Returns the version of the jar file the class is loaded from.
|
static String |
determineCreationDateFromJarFileName(Class<?> aClass)
Returns the name of the jar file the class is loaded from.
|
static String |
determineTitleFromJarManifest(String aJarFilePattern,
String aPackage)
Returns the title of the jar file the class is loaded from.
|
static String |
determineVersionFromJarFileName(Class<?> aClass)
Returns the name of the jar file the class is loaded from.
|
static String |
determineVersionFromJarManifest(String aJarFilePattern,
String aPackage)
Returns the version of the jar file the class is loaded from.
|
static String |
readAttributeFromJarManifest(String aJarFilePattern,
String aPackage,
String anAttributeName,
String aDefault)
Returns the attribute from the manifest of the jar file or the default
if not found.
|
public static String determineVersionFromJarFileName(Class<?> aClass)
aClass - a class that is known to be loaded form the jar
in questionpublic static String determineCreationDateFromJarFileName(Class<?> aClass)
aClass - a class that is known to be loaded form the jar
in questionpublic static String determineVersionFromJarManifest(String aJarFilePattern, String aPackage)
aJarFilePattern - the regex pattern of the jar fileaPackage - the name of the package or nullpublic static String determineTitleFromJarManifest(String aJarFilePattern, String aPackage)
aJarFilePattern - the regex pattern of the jar fileaPackage - the name of the package or nullpublic static String determineBundleNameFromJarManifest(String aJarFilePattern, String aPackage)
aJarFilePattern - the regex pattern of the jar fileaPackage - the name of the package or nullpublic static String determineBundleVersionFromJarManifest(String aJarFilePattern, String aPackage)
aJarFilePattern - the regex pattern of the jar fileaPackage - the name of the package or nullpublic static String readAttributeFromJarManifest(String aJarFilePattern, String aPackage, String anAttributeName, String aDefault)
aJarFilePattern - the regex pattern of the jar fileaPackage - the name of the package or nullanAttributeName - the name of the attribute to look foraDefault - the return value if not foundCopyright © 2021–2022 Gargoyle Software Inc.. All rights reserved.