code: public static Version parse(String version) {
  
      Assert.hasText(version, "The version [%s] must be specified", version);
  
      String[] versionNumbers = version.split("\\.");
  
      Assert.isTrue(versionNumbers.length > 1,
        "Version [%s] must minimally consist of major and minor version numbers", version);
  
      switch (versionNumbers.length) {
        case 2:
          return parseMajorMinor(versionNumbers);
        case 3:
          return parseMajorMinorMaintenance(versionNumbers);
        case 4:
          return parseMajorMinorMaintenanceQualifier(versionNumbers);
        default:
          throw new IllegalArgumentException(String.format("Unrecognized format for version [%s]", version));
      }
    }
docs: Factory method to parse a version {@link String} into a fully qualified instance of {@link Version}.
  
  @param version {@link String} representation of the version.
  @return a new instance of {@link Version} initialized with the given version {@link String}.
  @throws IllegalArgumentException if the {@code version} {@link String} is {@literal null} or empty,
  or the version {@link String} could not be parsed into individual version elements,
  or the version {@link String} is unrecognizable.
  @see #parseMajorMinorMaintenanceQualifier(String[])
  @see #parseMajorMinorMaintenance(String[])
  @see #parseMajorMinor(String[])