Package org.glassfish.spec
Class Metadata
java.lang.Object
org.glassfish.spec.Metadata
Represents an API JAR
MANIFEST.MF
entries.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Entry name for Bundle Spec Version.static final String
Entry name for Bundle Symbolic Name.static final String
Entry name for Bundle Version.private String
Bundle Spec Version.private String
Bundle Symbolic Name.private String
Bundle Version.List of collected errors.static final String
Entry name for Jar Extension Name.static final String
Entry name for Jar Implementation Version.static final String
Entry name for Jar Specification Version.private String
Jar Extension Name.private String
Jar Implementation Version.private String
Jar Specification Version.private static final String[]
All the metadata entry names.private Properties
Properties. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Metadata
Create a newMetadata
instance from a JAR file.Get the bundle spec version entry.Get the bundle symbolic name entry.Get the bundle version entry.Get the metadata errors.Get the jar extension name entry.Get the jar implementation version entry.Get the jar specification version entry.Get the metadata properties.
-
Field Details
-
bundleSymbolicName
Bundle Symbolic Name. -
bundleSpecVersion
Bundle Spec Version. -
bundleVersion
Bundle Version. -
jarExtensionName
Jar Extension Name. -
jarSpecificationVersion
Jar Specification Version. -
jarImplementationVersion
Jar Implementation Version. -
properties
Properties. -
BUNDLE_SYMBOLIC_NAME
Entry name for Bundle Symbolic Name.- See Also:
-
BUNDLE_SPEC_VERSION
Entry name for Bundle Spec Version.- See Also:
-
BUNDLE_VERSION
Entry name for Bundle Version.- See Also:
-
JAR_EXTENSION_NAME
Entry name for Jar Extension Name.- See Also:
-
JAR_SPECIFICATION_VERSION
Entry name for Jar Specification Version.- See Also:
-
JAR_IMPLEMENTATION_VERSION
Entry name for Jar Implementation Version.- See Also:
-
errors
List of collected errors. -
KEYS
All the metadata entry names.
-
-
Constructor Details
-
Metadata
Create a newMetadata
instance.- Parameters:
bsn
- bundle symbolic namebsv
- bundle spec versionbv
- bundle versionjen
- jar extension namejsv
- jar spec versionjiv
- jar implementation versionerrs
- errors
-
Metadata
Create a newMetadata
instance.- Parameters:
bsn
- bundle symbolic namebsv
- bundle spec versionbv
- bundle versionjen
- jar extension namejsv
- jar spec versionjiv
- jar implementation version
-
-
Method Details
-
fromJar
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
Get the bundle symbolic name entry.- Returns:
- bundle symbolic name
-
getBundleSpecVersion
Get the bundle spec version entry.- Returns:
- bundle spec version
-
getBundleVersion
Get the bundle version entry.- Returns:
- bundle version
-
getJarExtensionName
Get the jar extension name entry.- Returns:
- jar extension name
-
getJarSpecificationVersion
Get the jar specification version entry.- Returns:
- jar specification version
-
getjarImplementationVersion
Get the jar implementation version entry.- Returns:
- jar implementation version
-
getProperties
Get the metadata properties.- Returns:
- metadata properties
-
getErrors
Get the metadata errors.- Returns:
- the list of errors
-