public enum JdkVersion extends java.lang.Enum<JdkVersion>
Enum Constant and Description |
---|
JDK_1_3
JDK 1.3
|
JDK_1_4
JDK 1.4
|
JDK_1_5
JDK 1.5
|
JDK_1_6
JDK 1.6
|
JDK_1_7
JDK 1.7
|
JDK_1_8
JDK 1.8
|
JDK_UNKNOWN
Unknown JDK version
|
Modifier and Type | Method and Description |
---|---|
byte |
getJ2se()
Get the JavaTokens.J2SE_XXX value that corresponds to
this JdkVersion.
|
static JdkVersion |
getJdkVersion(byte j2se)
Converts from JavaTokens.J2SE_XXX value to JdkVersion.
|
static JdkVersion |
getMaxVersion()
Get the maximum JDK version supported by JOT.
|
static JdkVersion |
getMinVersion()
Get the minimum JDK version supported by JOT.
|
java.lang.String |
getVersionString()
Get the version String of this JdkVersion in the format compatible
with what the Javac -source and -target options expect, e.g.
|
boolean |
hasGenerics()
Determine if this JDK version supports generics, which is JDK 1.5 and higher
|
boolean |
isJdk3OrAbove()
Is this JDK version 1.3 or above?
|
boolean |
isJdk4OrAbove()
Is this JDK version 1.4 or above?
|
boolean |
isJdk5OrAbove()
Is this JDK version 1.5 or above?
|
boolean |
isJdk6OrAbove()
Is this JDK version 1.6 or above?
|
boolean |
isJdk7OrAbove()
Is this JDK version 1.7 or above?
|
boolean |
isJdk8OrAbove()
Is this JDK version 1.8 or above?
|
static JdkVersion |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static JdkVersion[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final JdkVersion JDK_UNKNOWN
public static final JdkVersion JDK_1_3
public static final JdkVersion JDK_1_4
public static final JdkVersion JDK_1_5
public static final JdkVersion JDK_1_6
public static final JdkVersion JDK_1_7
public static final JdkVersion JDK_1_8
public static JdkVersion[] values()
for (JdkVersion c : JdkVersion.values()) System.out.println(c);
public static JdkVersion valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant
with the specified namejava.lang.NullPointerException
- if the argument is nullpublic static JdkVersion getMinVersion()
public static JdkVersion getMaxVersion()
public boolean hasGenerics()
public boolean isJdk3OrAbove()
public boolean isJdk4OrAbove()
public boolean isJdk5OrAbove()
public boolean isJdk6OrAbove()
public boolean isJdk7OrAbove()
public boolean isJdk8OrAbove()
public static JdkVersion getJdkVersion(byte j2se)
j2se
- Should be one of JavaTokens.J2SE_XXXpublic byte getJ2se()
public java.lang.String getVersionString()