Package com.amazonaws.util
Enum JavaVersionParser.KnownJavaVersions
- java.lang.Object
-
- java.lang.Enum<JavaVersionParser.KnownJavaVersions>
-
- com.amazonaws.util.JavaVersionParser.KnownJavaVersions
-
- All Implemented Interfaces:
Serializable
,Comparable<JavaVersionParser.KnownJavaVersions>
- Enclosing class:
- JavaVersionParser
public static enum JavaVersionParser.KnownJavaVersions extends Enum<JavaVersionParser.KnownJavaVersions>
Enum representing all the Java versions we know about and a special enum valueUNKNOWN
for ones we don't yet know about
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static JavaVersionParser.KnownJavaVersions
fromMajorVersion(Integer majorVersionFamily, Integer majorVersion)
Tries to determine a known version from the parsed major version componentsstatic JavaVersionParser.KnownJavaVersions
valueOf(String name)
Returns the enum constant of this type with the specified name.static JavaVersionParser.KnownJavaVersions[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
JAVA_6
public static final JavaVersionParser.KnownJavaVersions JAVA_6
-
JAVA_7
public static final JavaVersionParser.KnownJavaVersions JAVA_7
-
JAVA_8
public static final JavaVersionParser.KnownJavaVersions JAVA_8
-
JAVA_9
public static final JavaVersionParser.KnownJavaVersions JAVA_9
-
UNKNOWN
public static final JavaVersionParser.KnownJavaVersions UNKNOWN
-
-
Method Detail
-
values
public static JavaVersionParser.KnownJavaVersions[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (JavaVersionParser.KnownJavaVersions c : JavaVersionParser.KnownJavaVersions.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static JavaVersionParser.KnownJavaVersions valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
fromMajorVersion
public static JavaVersionParser.KnownJavaVersions fromMajorVersion(Integer majorVersionFamily, Integer majorVersion)
Tries to determine a known version from the parsed major version components- Parameters:
majorVersionFamily
- Major version family of the JVM. Currently only 1 is known (i.e. '1.7')majorVersion
- Major version of JVM (6, 7, 8, etc)- Returns:
- A
JavaVersionParser.KnownJavaVersions
orUNKNOWN
if unable to determine
-
-