< prev index next >
src/java.compiler/share/classes/javax/lang/model/SourceVersion.java
Print this page
*** 54,63 ****
--- 54,64 ----
* 1.5: annotations, generics, autoboxing, var-args...
* 1.6: no changes
* 1.7: diamond syntax, try-with-resources, etc.
* 1.8: lambda expressions and default methods
* 9: modules, small cleanups to 1.7 and 1.8 changes
+ * 10: to-be-determined changes
*/
/**
* The original version.
*
*** 148,178 ****
* Additions in this release include modules and removal of a
* single underscore from the set of legal identifier names.
*
* @since 9
*/
! RELEASE_9;
// Note that when adding constants for newer releases, the
// behavior of latest() and latestSupported() must be updated too.
/**
* Returns the latest source version that can be modeled.
*
* @return the latest source version that can be modeled
*/
public static SourceVersion latest() {
! return RELEASE_9;
}
private static final SourceVersion latestSupported = getLatestSupported();
private static SourceVersion getLatestSupported() {
try {
String specVersion = System.getProperty("java.specification.version");
switch (specVersion) {
case "9":
case "1.9":
return RELEASE_9;
case "1.8":
return RELEASE_8;
--- 149,189 ----
* Additions in this release include modules and removal of a
* single underscore from the set of legal identifier names.
*
* @since 9
*/
! RELEASE_9,
!
! /**
! * The version recognized by the Java Platform, Standard Edition
! * 10.
! *
! * @since 10
! */
! RELEASE_10;
// Note that when adding constants for newer releases, the
// behavior of latest() and latestSupported() must be updated too.
/**
* Returns the latest source version that can be modeled.
*
* @return the latest source version that can be modeled
*/
public static SourceVersion latest() {
! return RELEASE_10;
}
private static final SourceVersion latestSupported = getLatestSupported();
private static SourceVersion getLatestSupported() {
try {
String specVersion = System.getProperty("java.specification.version");
switch (specVersion) {
+ case "10":
+ return RELEASE_10;
case "9":
case "1.9":
return RELEASE_9;
case "1.8":
return RELEASE_8;
< prev index next >