< prev index next >
src/jdk.compiler/share/classes/com/sun/tools/javac/code/Source.java
Print this page
@@ -83,11 +83,14 @@
/** 1.11 local-variable syntax for lambda parameters */
JDK11("11"),
/** 12 covers the to be determined language features that will be added in JDK 12. */
- JDK12("12");
+ JDK12("12"),
+
+ /** 13 covers the to be determined language features that will be added in JDK 13. */
+ JDK13("13");
private static final Context.Key<Source> sourceKey = new Context.Key<>();
public static Source instance(Context context) {
Source instance = context.get(sourceKey);
@@ -134,10 +137,11 @@
public boolean isSupported() {
return this.compareTo(MIN) >= 0;
}
public Target requiredTarget() {
+ if (this.compareTo(JDK13) >= 0) return Target.JDK1_13;
if (this.compareTo(JDK12) >= 0) return Target.JDK1_12;
if (this.compareTo(JDK11) >= 0) return Target.JDK1_11;
if (this.compareTo(JDK10) >= 0) return Target.JDK1_10;
if (this.compareTo(JDK9) >= 0) return Target.JDK1_9;
if (this.compareTo(JDK8) >= 0) return Target.JDK1_8;
@@ -268,10 +272,12 @@
return RELEASE_10;
case JDK11:
return RELEASE_11;
case JDK12:
return RELEASE_12;
+ case JDK13:
+ return RELEASE_13;
default:
return null;
}
}
}
< prev index next >