< prev index next >
src/java.compiler/share/classes/javax/lang/model/SourceVersion.java
Print this page
*** 58,68 ****
* 9: modules, small cleanups to 1.7 and 1.8 changes
* 10: local-variable type inference (var)
* 11: local-variable syntax for lambda parameters
* 12: no changes (switch expressions in preview)
* 13: no changes (switch expressions and text blocks in preview)
! * 14: switch expressions
*/
/**
* The original version.
*
--- 58,70 ----
* 9: modules, small cleanups to 1.7 and 1.8 changes
* 10: local-variable type inference (var)
* 11: local-variable syntax for lambda parameters
* 12: no changes (switch expressions in preview)
* 13: no changes (switch expressions and text blocks in preview)
! * 14: switch expressions (pattern matching and records in
! * preview, text blocks in preview again)
! * 15: TBD
*/
/**
* The original version.
*
*** 201,222 ****
*
* Additions in this release include switch expressions.
*
* @since 14
*/
! RELEASE_14;
// 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_14;
}
private static final SourceVersion latestSupported = getLatestSupported();
/*
--- 203,232 ----
*
* Additions in this release include switch expressions.
*
* @since 14
*/
! RELEASE_14,
!
! /**
! * The version recognized by the Java Platform, Standard Edition
! * 15.
! *
! * @since 15
! */
! RELEASE_15;
// 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_15;
}
private static final SourceVersion latestSupported = getLatestSupported();
/*
*** 227,237 ****
* need to be updated accordingly.
*/
private static SourceVersion getLatestSupported() {
int intVersion = Runtime.version().feature();
return (intVersion >= 11) ?
! valueOf("RELEASE_" + Math.min(14, intVersion)):
RELEASE_10;
}
/**
* Returns the latest source version fully supported by the
--- 237,247 ----
* need to be updated accordingly.
*/
private static SourceVersion getLatestSupported() {
int intVersion = Runtime.version().feature();
return (intVersion >= 11) ?
! valueOf("RELEASE_" + Math.min(15, intVersion)):
RELEASE_10;
}
/**
* Returns the latest source version fully supported by the
< prev index next >