Class LibraryDescriptor


  • public class LibraryDescriptor
    extends Object
    The library description. Stores the library name, version, vendor, model version, runtime version and its location.
    • Field Detail

      • LIBRARY_VERSION_PATTERN

        public static final String LIBRARY_VERSION_PATTERN
        The library version regex pattern.
        See Also:
        Constant Field Values
    • Constructor Detail

      • LibraryDescriptor

        public LibraryDescriptor​(String libraryName,
                                 String libraryVersion,
                                 String libraryVendor,
                                 String libraryModelVersion,
                                 Version libraryRuntimeVersion,
                                 CompatibilityMode libraryCompatibilityMode,
                                 Path libraryLocation)
        Creates a library descriptor with the given parameters.
        Parameters:
        libraryName - the library name, cannot be null
        libraryVersion - the library version, cannot be null
        libraryVendor - the library vendor, cannot be null
        libraryModelVersion - the library model version, cannot be null
        libraryRuntimeVersion - the library runtime version, cannot be null
        libraryCompatibilityMode - the library compatibility mode, cannot be null
        libraryLocation - the library location, cannot be null
    • Method Detail

      • getLibraryName

        public String getLibraryName()
        Returns the library name.
        Returns:
        the library name, never null
      • getLibraryVersion

        public String getLibraryVersion()
        Returns the library version.
        Returns:
        the library version, never null
      • getLibraryVendor

        public String getLibraryVendor()
        Returns the library vendor.
        Returns:
        the library vendor, never null
      • getLibraryModelVersion

        public String getLibraryModelVersion()
        Returns the library model version.
        Returns:
        the library model version, never null
      • getLibraryRuntimeVersion

        public Version getLibraryRuntimeVersion()
        Returns the library runtime version.
        Returns:
        the library runtime version, never null
      • getLibraryCompatibilityMode

        public CompatibilityMode getLibraryCompatibilityMode()
        Returns the library compatibility mode.
        Returns:
        the library compatibility mode, never null
      • getLibraryLocation

        public Path getLibraryLocation()
        Returns the library location.
        Returns:
        the library location, never null
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • fitsLibraryDependency

        public boolean fitsLibraryDependency​(LibraryDependency libraryDependency)
        Checks whether this descriptor fits the specified dependency on the library.
        Parameters:
        libraryDependency - the dependency on the library, cannot be null
        Returns:
        true if this descriptor fits the dependency on the library, false otherwise