Class LibraryUtils


  • public class LibraryUtils
    extends Object
    The library mechanism utility methods.
    • Constructor Detail

      • LibraryUtils

        public LibraryUtils()
    • Method Detail

      • readLibraryDependency

        public static LibraryDependency readLibraryDependency​(InputStream manifestStream)
                                                       throws IOException
        Reads a dependency on a library from the specified manifest.
        Parameters:
        manifestStream - the stream to read the manifest; the stream should be closed by clients, cannot be null
        Returns:
        the dependency on the library, may be null
        Throws:
        IOException - if any I/O error occurs
      • getLibraryDescriptorByLibraryDependency

        public static LibraryDescriptor getLibraryDescriptorByLibraryDependency​(LibraryDependency libraryDependency,
                                                                                ILibraryRepository libraryRepository)
        Returns the library descriptor for the specidied dependency on the library. If more than one library satisfies the specified dependency, the library with the highest version is returned.
        Parameters:
        libraryDependency - the dependency on the library, cannot be null
        libraryRepository - the library repository, cannot be null
        Returns:
        the library descriptor, may be null