Class Metadata

java.lang.Object
org.glassfish.spec.Metadata

public final class Metadata extends Object
Represents an API JAR MANIFEST.MF entries.
Author:
Romain Grecourt
  • Field Details

    • BUNDLE_SYMBOLIC_NAME

      public static final String BUNDLE_SYMBOLIC_NAME
      Entry name for Bundle Symbolic Name.
      See Also:
    • BUNDLE_SPEC_VERSION

      public static final String BUNDLE_SPEC_VERSION
      Entry name for Bundle Spec Version.
      See Also:
    • BUNDLE_VERSION

      public static final String BUNDLE_VERSION
      Entry name for Bundle Version.
      See Also:
    • JAR_EXTENSION_NAME

      public static final String JAR_EXTENSION_NAME
      Entry name for Jar Extension Name.
      See Also:
    • JAR_SPECIFICATION_VERSION

      public static final String JAR_SPECIFICATION_VERSION
      Entry name for Jar Specification Version.
      See Also:
    • JAR_IMPLEMENTATION_VERSION

      public static final String JAR_IMPLEMENTATION_VERSION
      Entry name for Jar Implementation Version.
      See Also:
  • Method Details

    • fromJar

      public static Metadata fromJar(JarFile jar) throws IOException
      Create a new Metadata 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
    • getErrors

      public List<String> getErrors()
      Get the metadata errors.
      Returns:
      the list of errors