public enum JdkVersion extends java.lang.Enum<JdkVersion>
Enum Constant and Description |
---|
JDK_1_1
JDK 1.1.
|
JDK_1_2
JDK 1.2.
|
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_10
JDK 10.
|
JDK_11
JDK 11.
|
JDK_12
JDK 12.
|
JDK_13
JDK 13.
|
JDK_14
JDK 14.
|
JDK_15
JDK 15.
|
JDK_16
JDK 16.
|
JDK_17
JDK 17.
|
JDK_18
JDK 18.
|
JDK_19
JDK 19.
|
JDK_20
JDK 20.
|
JDK_21
JDK 21.
|
JDK_22
JDK 22.
|
JDK_23
JDK 23.
|
JDK_24
JDK 24.
|
JDK_25
JDK 25.
|
JDK_9
JDK 9.
|
JDK_UNKNOWN
Unknown JDK version.
|
Modifier and Type | Method and Description |
---|---|
byte |
getJ2se()
Deprecated.
JavaTokens.J2SE_XXX's are replaced with JdkVersion's
|
static JdkVersion |
getJdkVersion(byte j2se)
Converts from JavaTokens.J2SE_XXX value to JdkVersion.
|
static JdkVersion |
getJdkVersion(java.lang.String version)
Given a version string where the version is assumed to be one or
more numbers separated by dots, followed by any other information,
for example, 1.8.0_40 or 9-internal, but not internal-9, create a
corresponding JdkVersion.
|
static JdkVersion |
getMaxVersion()
Get the maximum JDK version supported by JOT.
|
static JdkVersion |
getMinVersion()
Get the minimum JDK version supported by JOT.
|
JdkVersion |
getNextVersion()
Get the JdkVersion after this version.
|
JdkVersion |
getPreviousVersion()
Get the JdkVersion before this version.
|
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 |
isHigherOrEqualVersion(JdkVersion that)
Is this JdkVersion higher than or equal to
the incoming JdkVersion?
|
boolean |
isHigherVersion(JdkVersion that)
Is this JdkVersion higher than the incoming JdkVersion?
|
boolean |
isJdk1OrAbove()
Is this JDK version 1.1 or above?
|
boolean |
isJdk2OrAbove()
Is this JDK version 1.2 or above?
|
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?
|
boolean |
isJdk9OrAbove()
Is this JDK version 9 or above?
|
boolean |
isLowerOrEqualVersion(JdkVersion that)
Is this JdkVersion lower than or equal to
the incoming JdkVersion?
|
boolean |
isLowerVersion(JdkVersion that)
Is this JdkVersion lower than the incoming JdkVersion?
|
java.lang.String |
toString() |
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_1
public static final JdkVersion JDK_1_2
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 final JdkVersion JDK_9
public static final JdkVersion JDK_10
public static final JdkVersion JDK_11
public static final JdkVersion JDK_12
public static final JdkVersion JDK_13
public static final JdkVersion JDK_14
public static final JdkVersion JDK_15
public static final JdkVersion JDK_16
public static final JdkVersion JDK_17
public static final JdkVersion JDK_18
public static final JdkVersion JDK_19
public static final JdkVersion JDK_20
public static final JdkVersion JDK_21
public static final JdkVersion JDK_22
public static final JdkVersion JDK_23
public static final JdkVersion JDK_24
public static final JdkVersion JDK_25
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 isJdk1OrAbove()
public boolean isJdk2OrAbove()
public boolean isJdk3OrAbove()
public boolean isJdk4OrAbove()
public boolean isJdk5OrAbove()
public boolean isJdk6OrAbove()
public boolean isJdk7OrAbove()
public boolean isJdk8OrAbove()
public boolean isJdk9OrAbove()
public boolean isHigherVersion(JdkVersion that)
that
- A JdkVersion which should not be nullpublic boolean isHigherOrEqualVersion(JdkVersion that)
that
- A JdkVersion which should not be nullpublic boolean isLowerVersion(JdkVersion that)
that
- A JdkVersion which should not be nullpublic boolean isLowerOrEqualVersion(JdkVersion that)
that
- A JdkVersion which should not be nullpublic static JdkVersion getJdkVersion(byte j2se)
j2se
- Should be one of JavaTokens.J2SE_XXXpublic static JdkVersion getJdkVersion(java.lang.String version)
version
- A version string@Deprecated public byte getJ2se()
public java.lang.String getVersionString()
public JdkVersion getPreviousVersion()
JDK_UNKNOWN
if not foundpublic JdkVersion getNextVersion()
JDK_UNKNOWN
if not foundpublic java.lang.String toString()
toString
in class java.lang.Enum<JdkVersion>