Package org.apache.maven.api.services
Interface VersionParser
- All Superinterfaces:
- Service
- All Known Implementing Classes:
- DefaultVersionParser
Service interface to parse 
Version and VersionRange.- Since:
- 4.0.0
- 
Method SummaryModifier and TypeMethodDescriptionbooleanisSnapshot(String version) Checks whether a given artifact version is considered aSNAPSHOTor not.parseVersion(String version) Parses the specified version string, for example "1.0".parseVersionConstraint(String constraint) Parses the specified version constraint specification, for example "1.0" or "[1.0,2.0)".parseVersionRange(String range) Parses the specified version range specification, for example "[1.0,2.0)".
- 
Method Details- 
parseVersionParses the specified version string, for example "1.0".- Parameters:
- version- the version string to parse, must not be- null
- Returns:
- the parsed version, never null
- Throws:
- VersionParserException- if the string violates the syntax rules of this scheme
- See Also:
 
- 
parseVersionRangeParses the specified version range specification, for example "[1.0,2.0)".- Parameters:
- range- the range specification to parse, must not be- null
- Returns:
- the parsed version range, never null
- Throws:
- VersionParserException- if the range specification violates the syntax rules of this scheme
 
- 
parseVersionConstraintParses the specified version constraint specification, for example "1.0" or "[1.0,2.0)".- Parameters:
- constraint- the constraint specification to parse, must not be- null
- Returns:
- the parsed version constraint, never null
- Throws:
- VersionParserException- if the range specification violates the syntax rules of this scheme
 
- 
isSnapshotChecks whether a given artifact version is considered aSNAPSHOTor not.
 
-