< prev index next >

src/java.compiler/share/classes/javax/lang/model/SourceVersion.java

Print this page

        

@@ -157,31 +157,41 @@
      * The version recognized by the Java Platform, Standard Edition
      * 10.
      *
      * @since 10
      */
-     RELEASE_10;
+     RELEASE_10,
+
+    /**
+     * The version recognized by the Java Platform, Standard Edition
+     * 11.
+     *
+     * @since 11
+     */
+     RELEASE_11;
 
     // 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;
+        return RELEASE_11;
     }
 
     private static final SourceVersion latestSupported = getLatestSupported();
 
     private static SourceVersion getLatestSupported() {
         try {
             String specVersion = System.getProperty("java.specification.version");
 
             switch (specVersion) {
+                case "11":
+                    return RELEASE_11;
                 case "10":
                     return RELEASE_10;
                 case "9":
                     return RELEASE_9;
                 case "1.8":
< prev index next >