< prev index next >

src/jdk.compiler/share/classes/com/sun/tools/javac/code/Source.java

Print this page

        

*** 80,90 **** /** 1.10 local-variable type inference (var). */ JDK10("10"), /** 1.11 covers the to be determined language features that will be added in JDK 11. */ ! JDK11("11"); private static final Context.Key<Source> sourceKey = new Context.Key<>(); public static Source instance(Context context) { Source instance = context.get(sourceKey); --- 80,93 ---- /** 1.10 local-variable type inference (var). */ JDK10("10"), /** 1.11 covers the to be determined language features that will be added in JDK 11. */ ! JDK11("11"), ! ! /** 12 covers the to be determined language features that will be added in JDK 12. */ ! JDK12("12"); private static final Context.Key<Source> sourceKey = new Context.Key<>(); public static Source instance(Context context) { Source instance = context.get(sourceKey);
*** 127,136 **** --- 130,140 ---- public static Source lookup(String name) { return tab.get(name); } public Target requiredTarget() { + 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; if (this.compareTo(JDK7) >= 0) return Target.JDK1_7;
*** 263,272 **** --- 267,278 ---- return RELEASE_9; case JDK10: return RELEASE_10; case JDK11: return RELEASE_11; + case JDK12: + return RELEASE_12; default: return null; } } }
< prev index next >