Package org.glassfish.spec
Class Metadata
- java.lang.Object
-
- org.glassfish.spec.Metadata
-
public final class Metadata extends Object
Represents an API JARMANIFEST.MF
entries.- Author:
- Romain Grecourt
-
-
Field Summary
Fields Modifier and Type Field Description static String
BUNDLE_SPEC_VERSION
Entry name for Bundle Spec Version.static String
BUNDLE_SYMBOLIC_NAME
Entry name for Bundle Symbolic Name.static String
BUNDLE_VERSION
Entry name for Bundle Version.static String
JAR_EXTENSION_NAME
Entry name for Jar Extension Name.static String
JAR_IMPLEMENTATION_VERSION
Entry name for Jar Implementation Version.static String
JAR_SPECIFICATION_VERSION
Entry name for Jar Specification Version.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Metadata
fromJar(JarFile jar)
Create a newMetadata
instance from a JAR file.String
getBundleSpecVersion()
Get the bundle spec version entry.String
getBundleSymbolicName()
Get the bundle symbolic name entry.String
getBundleVersion()
Get the bundle version entry.List<String>
getErrors()
Get the metadata errors.String
getJarExtensionName()
Get the jar extension name entry.String
getjarImplementationVersion()
Get the jar implementation version entry.String
getJarSpecificationVersion()
Get the jar specification version entry.Properties
getProperties()
Get the metadata properties.
-
-
-
Field Detail
-
BUNDLE_SYMBOLIC_NAME
public static final String BUNDLE_SYMBOLIC_NAME
Entry name for Bundle Symbolic Name.- See Also:
- Constant Field Values
-
BUNDLE_SPEC_VERSION
public static final String BUNDLE_SPEC_VERSION
Entry name for Bundle Spec Version.- See Also:
- Constant Field Values
-
BUNDLE_VERSION
public static final String BUNDLE_VERSION
Entry name for Bundle Version.- See Also:
- Constant Field Values
-
JAR_EXTENSION_NAME
public static final String JAR_EXTENSION_NAME
Entry name for Jar Extension Name.- See Also:
- Constant Field Values
-
JAR_SPECIFICATION_VERSION
public static final String JAR_SPECIFICATION_VERSION
Entry name for Jar Specification Version.- See Also:
- Constant Field Values
-
JAR_IMPLEMENTATION_VERSION
public static final String JAR_IMPLEMENTATION_VERSION
Entry name for Jar Implementation Version.- See Also:
- Constant Field Values
-
-
Method Detail
-
fromJar
public static Metadata fromJar(JarFile jar) throws IOException
Create a newMetadata
instance from a JAR file.- Parameters:
jar
- the JAR file to process- Returns:
- the created
Metadata
instance - Throws:
IOException
- if an error occurs while reading JAR entries
-
getBundleSymbolicName
public String getBundleSymbolicName()
Get the bundle symbolic name entry.- Returns:
- bundle symbolic name
-
getBundleSpecVersion
public String getBundleSpecVersion()
Get the bundle spec version entry.- Returns:
- bundle spec version
-
getBundleVersion
public String getBundleVersion()
Get the bundle version entry.- Returns:
- bundle version
-
getJarExtensionName
public String getJarExtensionName()
Get the jar extension name entry.- Returns:
- jar extension name
-
getJarSpecificationVersion
public String getJarSpecificationVersion()
Get the jar specification version entry.- Returns:
- jar specification version
-
getjarImplementationVersion
public String getjarImplementationVersion()
Get the jar implementation version entry.- Returns:
- jar implementation version
-
getProperties
public Properties getProperties()
Get the metadata properties.- Returns:
- metadata properties
-
-