Class ManifestUtils


  • public class ManifestUtils
    extends Object
    A set of utility methods to ease working with Parser and Clause
    • Method Detail

      • getImports

        public static List<org.apache.felix.utils.manifest.Clause> getImports​(Manifest manifest)
        Get the list of imports from the manifest. If no imports have been defined, this method returns an empty list.
        Parameters:
        manifest - the manifest
        Returns:
        the list of imports
      • getMandatoryImports

        public static List<org.apache.felix.utils.manifest.Clause> getMandatoryImports​(Manifest manifest)
        Get the list of non-optional imports from the manifest.
        Parameters:
        manifest - the manifest
        Returns:
        the list of non-optional imports
      • getExports

        public static List<org.apache.felix.utils.manifest.Clause> getExports​(Manifest manifest)
        Get the list of exports from the manifest. If no exports have been defined, this method returns an empty list.
        Parameters:
        manifest - the manifest
        Returns:
        the list of exports
      • isOptional

        public static boolean isOptional​(org.apache.felix.utils.manifest.Clause clause)
        Check if a given manifest clause represents an optional import
        Parameters:
        clause - the manifest clause
        Returns:
        true for an optional import, false for mandatory imports
      • isBundle

        public static boolean isBundle​(Manifest manifest)
        Check if the manifest contains the mandatory Bundle-Symbolic-Name
        Parameters:
        manifest - the manifest
        Returns:
        true if the manifest specifies a Bundle-Symbolic-Name
      • matches

        public static boolean matches​(org.apache.felix.utils.manifest.Clause requirement,
                                      org.apache.felix.utils.manifest.Clause export)
      • getVersionRange

        public static org.apache.felix.utils.version.VersionRange getVersionRange​(org.apache.felix.utils.manifest.Clause clause)