Package org.apache.ivy.plugins.parser.m2
Class MavenVersionRangeParser
- java.lang.Object
-
- org.apache.ivy.plugins.parser.m2.MavenVersionRangeParser
-
class MavenVersionRangeParser extends java.lang.ObjectParser 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 classMavenVersionRangeParser.BasicRangeprivate static classMavenVersionRangeParser.DeweyDecimalprivate static classMavenVersionRangeParser.MultiSetRangeprivate static interfaceMavenVersionRangeParser.Range
-
Field Summary
Fields Modifier and Type Field Description private static MavenVersionRangeParser.DeweyDecimaljavaVersion
-
Constructor Summary
Constructors Constructor Description MavenVersionRangeParser()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description (package private) static booleancurrentJavaVersionInRange(java.lang.String range)private static MavenVersionRangeParser.Rangeparse(java.lang.String rangeValue)(package private) static booleanrangeAccepts(java.lang.String range, java.lang.String value)private static java.lang.StringstripBoundChars(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
valueagainst therangeand returns true if thevaluelies 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)
-
-