< prev index next >

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

Print this page




  40  * model future releases of the language.
  41  *
  42  * @author Joseph D. Darcy
  43  * @author Scott Seligman
  44  * @author Peter von der Ah&eacute;
  45  * @since 1.6
  46  */
  47 public enum SourceVersion {
  48     /*
  49      * Summary of language evolution
  50      * 1.1: nested classes
  51      * 1.2: strictfp
  52      * 1.3: no changes
  53      * 1.4: assert
  54      * 1.5: annotations, generics, autoboxing, var-args...
  55      * 1.6: no changes
  56      * 1.7: diamond syntax, try-with-resources, etc.
  57      * 1.8: lambda expressions and default methods
  58      *   9: modules, small cleanups to 1.7 and 1.8 changes
  59      *  10: local-variable type inference (var)
  60      *  11: to be determined changes

  61      */
  62 
  63     /**
  64      * The original version.
  65      *
  66      * The language described in
  67      * <cite>The Java&trade; Language Specification, First Edition</cite>.
  68      */
  69     RELEASE_0,
  70 
  71     /**
  72      * The version recognized by the Java Platform 1.1.
  73      *
  74      * The language is {@code RELEASE_0} augmented with nested classes as described in the 1.1 update to
  75      * <cite>The Java&trade; Language Specification, First Edition</cite>.
  76      */
  77     RELEASE_1,
  78 
  79     /**
  80      * The version recognized by the Java 2 Platform, Standard Edition,


 151      * single underscore from the set of legal identifier names.
 152      *
 153      * @since 9
 154      */
 155      RELEASE_9,
 156 
 157     /**
 158      * The version recognized by the Java Platform, Standard Edition
 159      * 10.
 160      *
 161      * Additions in this release include local-variable type inference
 162      * ({@code var}).
 163      *
 164      * @since 10
 165      */
 166      RELEASE_10,
 167 
 168     /**
 169      * The version recognized by the Java Platform, Standard Edition
 170      * 11.



 171      *
 172      * @since 11
 173      */
 174      RELEASE_11,
 175 
 176     /**
 177      * The version recognized by the Java Platform, Standard Edition
 178      * 12.
 179      *
 180      * @since 12
 181      */
 182      RELEASE_12;
 183 
 184     // Note that when adding constants for newer releases, the
 185     // behavior of latest() and latestSupported() must be updated too.
 186 
 187     /**
 188      * Returns the latest source version that can be modeled.
 189      *
 190      * @return the latest source version that can be modeled




  40  * model future releases of the language.
  41  *
  42  * @author Joseph D. Darcy
  43  * @author Scott Seligman
  44  * @author Peter von der Ah&eacute;
  45  * @since 1.6
  46  */
  47 public enum SourceVersion {
  48     /*
  49      * Summary of language evolution
  50      * 1.1: nested classes
  51      * 1.2: strictfp
  52      * 1.3: no changes
  53      * 1.4: assert
  54      * 1.5: annotations, generics, autoboxing, var-args...
  55      * 1.6: no changes
  56      * 1.7: diamond syntax, try-with-resources, etc.
  57      * 1.8: lambda expressions and default methods
  58      *   9: modules, small cleanups to 1.7 and 1.8 changes
  59      *  10: local-variable type inference (var)
  60      *  11: local-variable syntax for lambda parameters
  61      *  12: TBD
  62      */
  63 
  64     /**
  65      * The original version.
  66      *
  67      * The language described in
  68      * <cite>The Java&trade; Language Specification, First Edition</cite>.
  69      */
  70     RELEASE_0,
  71 
  72     /**
  73      * The version recognized by the Java Platform 1.1.
  74      *
  75      * The language is {@code RELEASE_0} augmented with nested classes as described in the 1.1 update to
  76      * <cite>The Java&trade; Language Specification, First Edition</cite>.
  77      */
  78     RELEASE_1,
  79 
  80     /**
  81      * The version recognized by the Java 2 Platform, Standard Edition,


 152      * single underscore from the set of legal identifier names.
 153      *
 154      * @since 9
 155      */
 156      RELEASE_9,
 157 
 158     /**
 159      * The version recognized by the Java Platform, Standard Edition
 160      * 10.
 161      *
 162      * Additions in this release include local-variable type inference
 163      * ({@code var}).
 164      *
 165      * @since 10
 166      */
 167      RELEASE_10,
 168 
 169     /**
 170      * The version recognized by the Java Platform, Standard Edition
 171      * 11.
 172      *
 173      * Additions in this release include local-variable syntax for
 174      * lambda parameters.
 175      *
 176      * @since 11
 177      */
 178      RELEASE_11,
 179 
 180     /**
 181      * The version recognized by the Java Platform, Standard Edition
 182      * 12.
 183      *
 184      * @since 12
 185      */
 186      RELEASE_12;
 187 
 188     // Note that when adding constants for newer releases, the
 189     // behavior of latest() and latestSupported() must be updated too.
 190 
 191     /**
 192      * Returns the latest source version that can be modeled.
 193      *
 194      * @return the latest source version that can be modeled


< prev index next >