Class Metadata


  • public final class Metadata
    extends Object
    Represents an API JAR MANIFEST.MF entries.
    Author:
    Romain Grecourt
    • 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
      • 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 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