Class MavenVersionRangeParser

java.lang.Object
org.apache.ivy.plugins.parser.m2.MavenVersionRangeParser

class MavenVersionRangeParser extends Object
Parser that understands Maven version ranges of the form (,1.0] and such. More details about such ranges in Maven, can be found {@link https://cwiki.apache.org/confluence/display/MAVENOLD/Dependency+Mediation+and+Conflict+Resolution#DependencyMediationandConflictResolution-DependencyVersionRanges here}
  • Field Details

  • Constructor Details

    • MavenVersionRangeParser

      MavenVersionRangeParser()
  • Method Details

    • currentJavaVersionInRange

      static boolean currentJavaVersionInRange(String range)
      Parameters:
      range - The range to compare against
      Returns:
      Returns true if the current Java version, in which the instance of this class is running, is within the specified range. Else returns false.
    • rangeAccepts

      static boolean rangeAccepts(String range, String value)
      Parameters:
      range - The range to compare against
      value - The value being compared
      Returns:
      Compares the value against the range and returns true if the value lies within the range. Else returns false.
    • parse

      private static MavenVersionRangeParser.Range parse(String rangeValue)
    • stripBoundChars

      private static String stripBoundChars(String value)