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>
,java.lang.constant.Constable
- 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 value
UNKNOWN
for ones we don't yet know about-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionfromMajorVersion
(Integer majorVersionFamily, Integer majorVersion) Tries to determine a known version from the parsed major version componentsReturns 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 Details
-
JAVA_6
-
JAVA_7
-
JAVA_8
-
JAVA_9
-
UNKNOWN
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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
-