public class Manifests extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
Manifests.Attribute |
static class |
Manifests.PROJECT_ATTRIBUTES
project labels added to the Manifest and used by Swagger
|
Constructor and Description |
---|
Manifests() |
Modifier and Type | Method and Description |
---|---|
static Manifest |
getManifest(File file)
Returns the entry from the manifest for the given name
|
static String |
getManifestEntry(File file,
String attributeName)
Returns the entry from the manifest for the given name
|
static String |
getManifestEntry(Manifest manifest,
String attributeName)
Returns the entry from the manifest for the given name
|
static Map<Manifests.Attribute,String> |
getManifestEntryMap(Manifest manifest,
Class<? extends Manifests.Attribute> attributeEnum)
Looks up the mainAttributes in the Manifest and returns a Map these mainAttributes and their values.
|
static Manifest |
getManifestFromCurrentJar(Class<?> theClazz)
Returns the Manifest of the Jar in which theClazz is packaged up in.
|
public static String getManifestEntry(File file, String attributeName) throws IOException
IOException
public static String getManifestEntry(Manifest manifest, String attributeName) throws IOException
IOException
public static Manifest getManifest(File file) throws IOException
IOException
public static Manifest getManifestFromCurrentJar(Class<?> theClazz) throws IOException
theClazz
- - The class for which it will be used to find the jar in question.IOException
public static Map<Manifests.Attribute,String> getManifestEntryMap(Manifest manifest, Class<? extends Manifests.Attribute> attributeEnum)
manifest
- - Manifest that will be inspected for the mainAttribute names passed in.mainAttributeNames
- that will be included in the result Map.Copyright © 2011–2017 Red Hat. All rights reserved.