/** * Creates a version specification from the specifed components. * * @param major major component of the version specification, or null if not specified * @param minor minor component of the version specification, or null if not specified * @param micro micro component of the version specification, or null if not specified * @param qualifier Qualifier component of the version specification, or null if not specified * @throws IllegalArgumentException if the numerical components are negative * the qualifier string contains non-word/digit-characters, or * an earlier component is not specified but a later one is */ public VersionSpecification(Integer major, Integer minor, Integer micro, String qualifier) { this.major = major; this.minor = minor; this.micro = micro; this.qualifier = qualifier; initialize(); }
throw new IllegalArgumentException("Too many components in " + versionString); initialize();