Package org.apache.ivy.plugins.parser.m2
Class MavenVersionRangeParser
- java.lang.Object
-
- org.apache.ivy.plugins.parser.m2.MavenVersionRangeParser
-
class MavenVersionRangeParser extends java.lang.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}
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
MavenVersionRangeParser.BasicRange
private static class
MavenVersionRangeParser.DeweyDecimal
private static class
MavenVersionRangeParser.MultiSetRange
private static interface
MavenVersionRangeParser.Range
-
Field Summary
Fields Modifier and Type Field Description private static MavenVersionRangeParser.DeweyDecimal
javaVersion
-
Constructor Summary
Constructors Constructor Description MavenVersionRangeParser()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description (package private) static boolean
currentJavaVersionInRange(java.lang.String range)
private static MavenVersionRangeParser.Range
parse(java.lang.String rangeValue)
(package private) static boolean
rangeAccepts(java.lang.String range, java.lang.String value)
private static java.lang.String
stripBoundChars(java.lang.String value)
-
-
-
Field Detail
-
javaVersion
private static final MavenVersionRangeParser.DeweyDecimal javaVersion
-
-
Method Detail
-
currentJavaVersionInRange
static boolean currentJavaVersionInRange(java.lang.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(java.lang.String range, java.lang.String value)
- Parameters:
range
- The range to compare againstvalue
- The value being compared- Returns:
- Compares the
value
against therange
and returns true if thevalue
lies within therange
. Else returns false.
-
parse
private static MavenVersionRangeParser.Range parse(java.lang.String rangeValue)
-
stripBoundChars
private static java.lang.String stripBoundChars(java.lang.String value)
-
-