Package org.apache.maven.internal.impl
Class DefaultVersionParser
java.lang.Object
org.apache.maven.internal.impl.DefaultVersionParser
- All Implemented Interfaces:
Service
,VersionParser
A wrapper class around a resolver version that works as model version parser as well.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
isSnapshot
(String version) Checks whether a given artifact version is considered aSNAPSHOT
or 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)".
-
Constructor Details
-
DefaultVersionParser
-
-
Method Details
-
parseVersion
Description copied from interface:VersionParser
Parses the specified version string, for example "1.0".- Specified by:
parseVersion
in interfaceVersionParser
- Parameters:
version
- the version string to parse, must not benull
- Returns:
- the parsed version, never
null
- See Also:
-
parseVersionRange
Description copied from interface:VersionParser
Parses the specified version range specification, for example "[1.0,2.0)".- Specified by:
parseVersionRange
in interfaceVersionParser
- Parameters:
range
- the range specification to parse, must not benull
- Returns:
- the parsed version range, never
null
-
parseVersionConstraint
Description copied from interface:VersionParser
Parses the specified version constraint specification, for example "1.0" or "[1.0,2.0)".- Specified by:
parseVersionConstraint
in interfaceVersionParser
- Parameters:
constraint
- the constraint specification to parse, must not benull
- Returns:
- the parsed version constraint, never
null
-
isSnapshot
Description copied from interface:VersionParser
Checks whether a given artifact version is considered aSNAPSHOT
or not.- Specified by:
isSnapshot
in interfaceVersionParser
-