Package org.eclipse.aether.util.version
Class VersionSchemeSupport
java.lang.Object
org.eclipse.aether.util.version.VersionSchemeSupport
- All Implemented Interfaces:
VersionScheme
- Direct Known Subclasses:
GenericVersionScheme
A version scheme support class. A new implementation should extend this class and would receive full support for
ranges and constraints. The new implementation should implement
Version and
the one missing method in this class, the VersionScheme.parseVersion(String).- Since:
- 2.0.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionparseVersionConstraint(String constraint) Parses the specified version constraint specification, for example "1.0" or "[1.0,2.0),(2.0,)".parseVersionRange(String range) Parses the specified version range specification, for example "[1.0,2.0)".Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.eclipse.aether.version.VersionScheme
parseVersion
-
Constructor Details
-
VersionSchemeSupport
public VersionSchemeSupport()
-
-
Method Details
-
parseVersionRange
public GenericVersionRange parseVersionRange(String range) throws InvalidVersionSpecificationException Description copied from interface:VersionSchemeParses the specified version range specification, for example "[1.0,2.0)".- Specified by:
parseVersionRangein interfaceVersionScheme- Parameters:
range- The range specification to parse, must not benull.- Returns:
- The parsed version range, never
null. - Throws:
InvalidVersionSpecificationException- If the range specification violates the syntax rules of this scheme.
-
parseVersionConstraint
public GenericVersionConstraint parseVersionConstraint(String constraint) throws InvalidVersionSpecificationException Description copied from interface:VersionSchemeParses the specified version constraint specification, for example "1.0" or "[1.0,2.0),(2.0,)".- Specified by:
parseVersionConstraintin interfaceVersionScheme- Parameters:
constraint- The constraint specification to parse, must not benull.- Returns:
- The parsed version constraint, never
null. - Throws:
InvalidVersionSpecificationException- If the constraint specification violates the syntax rules of this scheme.
-