Class DefaultVersionParser

java.lang.Object
org.apache.maven.internal.impl.DefaultVersionParser
All Implemented Interfaces:
Service, VersionParser

@Named @Singleton public class DefaultVersionParser extends Object implements VersionParser
  • Constructor Details

    • DefaultVersionParser

      public DefaultVersionParser()
  • Method Details

    • parseVersion

      public Version parseVersion(String version)
      Description copied from interface: VersionParser
      Parses the specified version string, for example "1.0".
      Specified by:
      parseVersion in interface VersionParser
      Parameters:
      version - the version string to parse, must not be null
      Returns:
      the parsed version, never null
      See Also:
    • parseVersionRange

      public VersionRange parseVersionRange(String range)
      Description copied from interface: VersionParser
      Parses the specified version range specification, for example "[1.0,2.0)".
      Specified by:
      parseVersionRange in interface VersionParser
      Parameters:
      range - the range specification to parse, must not be null
      Returns:
      the parsed version range, never null
    • isSnapshot

      public boolean isSnapshot(String version)
      Description copied from interface: VersionParser
      Checks whether a given artifact version is considered a SNAPSHOT or not.
      Specified by:
      isSnapshot in interface VersionParser