Interface VersionUtils


public interface VersionUtils
Provides a set of utilities to work with artifact versions.
Since:
2.0
  • Method Details

    • containsVersion

      boolean containsVersion(String version, List<String> constraints) throws IllegalArgumentException
      Determines whether the specified version satisfies this constraint. In more detail, a version satisfies this constraint if it matches its version range or if this constraint has no version range and the specified version equals the version recommended by the constraint.
      Parameters:
      version - The version to test, must not be null.
      constraints - The versions to test against, must not be null.
      Returns:
      true if the specified version satisfies any of the constraints, false otherwise.
      Throws:
      IllegalArgumentException
    • discoverVersionUtils

      static VersionUtils discoverVersionUtils(ClassLoader classLoader)
      Discovers a VersionUtils through SPI.
      Returns:
      a new version utility.
      Since:
      2.0