Package org.eclipse.jetty.util
Class ManifestUtils
- java.lang.Object
-
- org.eclipse.jetty.util.ManifestUtils
-
@Deprecated(since="2021-05-27") public class ManifestUtils extends Object
Deprecated.
-
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static Optional<Manifest>
getManifest(Class<?> klass)
Deprecated.static Optional<String>
getVersion(Class<?> klass)
Deprecated.Attempts to return the version of the jar/module for the given class.
-
-
-
Method Detail
-
getVersion
public static Optional<String> getVersion(Class<?> klass)
Deprecated.Attempts to return the version of the jar/module for the given class.
First, retrieves the
Implementation-Version
main attribute of the manifest; if that is missing, retrieves the JPMS module version (via reflection); if that is missing, returns an empty Optional.- Parameters:
klass
- the class of the jar/module to retrieve the version- Returns:
- the jar/module version, or an empty Optional
-
-