CSR :
|
|
Relates :
|
|
Relates :
|
Summary ------- Add a new enum constant `RELEASE_12` to `javax.lang.model.SourceVersion` for the JDK 12 release and update the `FooVisitor9` visitors to cover release 12 as well. Problem ------- The `SourceVersion` enum needs an enum constant for each release being modeled. Solution -------- Append the enum constant `RELEASE_12` and update the visitor text and supported source version annotations to cover from `RELEASE_9` to `RELEASE_12`. Specification ------------- diff -r cc58f1fa0438 src/java.compiler/share/classes/javax/lang/model/SourceVersion.java --- a/src/java.compiler/share/classes/javax/lang/model/SourceVersion.java Tue Jun 19 09:34:41 2018 +0200 +++ b/src/java.compiler/share/classes/javax/lang/model/SourceVersion.java Tue Jun 19 16:17:24 2018 -0700 @@ -171,7 +171,15 @@ * * @since 11 */ - RELEASE_11; + RELEASE_11, + + /** + * The version recognized by the Java Platform, Standard Edition + * 12. + * + * @since 12 + */ + RELEASE_12; diff -r cc58f1fa0438 src/java.compiler/share/classes/javax/lang/model/util/AbstractAnnotationValueVisitor9.java --- a/src/java.compiler/share/classes/javax/lang/model/util/AbstractAnnotationValueVisitor9.java Tue Jun 19 09:34:41 2018 +0200 +++ b/src/java.compiler/share/classes/javax/lang/model/util/AbstractAnnotationValueVisitor9.java Tue Jun 19 16:17:24 2018 -0700 @@ -32,7 +32,7 @@ /** * A skeletal visitor for annotation values with default behavior * appropriate for source versions {@link SourceVersion#RELEASE_9 - * RELEASE_9} through {@link SourceVersion#RELEASE_11 RELEASE_11}. + * RELEASE_9} through {@link SourceVersion#RELEASE_12 RELEASE_12}. * * <p> <b>WARNING:</b> The {@code AnnotationValueVisitor} interface * implemented by this class may have methods added to it in the @@ -59,7 +59,7 @@ * @see AbstractAnnotationValueVisitor8 * @since 9 */ -@SupportedSourceVersion(RELEASE_11) +@SupportedSourceVersion(RELEASE_12) public abstract class AbstractAnnotationValueVisitor9<R, P> extends AbstractAnnotationValueVisitor8<R, P> { /** diff -r cc58f1fa0438 src/java.compiler/share/classes/javax/lang/model/util/AbstractElementVisitor9.java --- a/src/java.compiler/share/classes/javax/lang/model/util/AbstractElementVisitor9.java Tue Jun 19 09:34:41 2018 +0200 +++ b/src/java.compiler/share/classes/javax/lang/model/util/AbstractElementVisitor9.java Tue Jun 19 16:17:24 2018 -0700 @@ -34,7 +34,7 @@ /** * A skeletal visitor of program elements with default behavior * appropriate for source versions {@link SourceVersion#RELEASE_9 - * RELEASE_9} through {@link SourceVersion#RELEASE_11 RELEASE_11}. + * RELEASE_9} through {@link SourceVersion#RELEASE_12 RELEASE_12}. * * <p> <b>WARNING:</b> The {@code ElementVisitor} interface * implemented by this class may have methods added to it in the @@ -65,7 +65,7 @@ * @since 9 * @spec JPMS */ -@SupportedSourceVersion(RELEASE_11) +@SupportedSourceVersion(RELEASE_12) public abstract class AbstractElementVisitor9<R, P> extends AbstractElementVisitor8<R, P> { /** * Constructor for concrete subclasses to call. diff -r cc58f1fa0438 src/java.compiler/share/classes/javax/lang/model/util/AbstractTypeVisitor9.java --- a/src/java.compiler/share/classes/javax/lang/model/util/AbstractTypeVisitor9.java Tue Jun 19 09:34:41 2018 +0200 +++ b/src/java.compiler/share/classes/javax/lang/model/util/AbstractTypeVisitor9.java Tue Jun 19 16:17:24 2018 -0700 @@ -33,7 +33,7 @@ /** * A skeletal visitor of types with default behavior appropriate for * source versions {@link SourceVersion#RELEASE_9 RELEASE_9} through - * {@link SourceVersion#RELEASE_11 RELEASE_11}. + * {@link SourceVersion#RELEASE_12 RELEASE_12}. * * <p> <b>WARNING:</b> The {@code TypeVisitor} interface implemented * by this class may have methods added to it in the future to @@ -63,7 +63,7 @@ * @see AbstractTypeVisitor8 * @since 9 */ -@SupportedSourceVersion(RELEASE_11) +@SupportedSourceVersion(RELEASE_12) public abstract class AbstractTypeVisitor9<R, P> extends AbstractTypeVisitor8<R, P> { /** * Constructor for concrete subclasses to call. diff -r cc58f1fa0438 src/java.compiler/share/classes/javax/lang/model/util/ElementKindVisitor9.java --- a/src/java.compiler/share/classes/javax/lang/model/util/ElementKindVisitor9.java Tue Jun 19 09:34:41 2018 +0200 +++ b/src/java.compiler/share/classes/javax/lang/model/util/ElementKindVisitor9.java Tue Jun 19 16:17:24 2018 -0700 @@ -34,7 +34,7 @@ * A visitor of program elements based on their {@linkplain * ElementKind kind} with default behavior appropriate for source * versions {@link SourceVersion#RELEASE_9 RELEASE_9} through {@link - * SourceVersion#RELEASE_11 RELEASE_11}. + * SourceVersion#RELEASE_12 RELEASE_12}. * * For {@linkplain * Element elements} <code><i>Xyz</i></code> that may have more than one @@ -80,7 +80,7 @@ * @since 9 * @spec JPMS */ -@SupportedSourceVersion(RELEASE_11) +@SupportedSourceVersion(RELEASE_12) public class ElementKindVisitor9<R, P> extends ElementKindVisitor8<R, P> { /** * Constructor for concrete subclasses; uses {@code null} for the diff -r cc58f1fa0438 src/java.compiler/share/classes/javax/lang/model/util/ElementScanner9.java --- a/src/java.compiler/share/classes/javax/lang/model/util/ElementScanner9.java Tue Jun 19 09:34:41 2018 +0200 +++ b/src/java.compiler/share/classes/javax/lang/model/util/ElementScanner9.java Tue Jun 19 16:17:24 2018 -0700 @@ -34,7 +34,7 @@ /** * A scanning visitor of program elements with default behavior * appropriate for source versions {@link SourceVersion#RELEASE_9 - * RELEASE_9} through {@link SourceVersion#RELEASE_11 RELEASE_11}. + * RELEASE_9} through {@link SourceVersion#RELEASE_12 RELEASE_12}. * * The <code>visit<i>Xyz</i></code> methods in this * class scan their component elements by calling {@code scan} on @@ -92,7 +92,7 @@ * @since 9 * @spec JPMS */ -@SupportedSourceVersion(RELEASE_11) +@SupportedSourceVersion(RELEASE_12) public class ElementScanner9<R, P> extends ElementScanner8<R, P> { /** * Constructor for concrete subclasses; uses {@code null} for the diff -r cc58f1fa0438 src/java.compiler/share/classes/javax/lang/model/util/SimpleAnnotationValueVisitor9.java --- a/src/java.compiler/share/classes/javax/lang/model/util/SimpleAnnotationValueVisitor9.java Tue Jun 19 09:34:41 2018 +0200 +++ b/src/java.compiler/share/classes/javax/lang/model/util/SimpleAnnotationValueVisitor9.java Tue Jun 19 16:17:24 2018 -0700 @@ -32,7 +32,7 @@ /** * A simple visitor for annotation values with default behavior * appropriate for source versions {@link SourceVersion#RELEASE_9 - * RELEASE_9} through {@link SourceVersion#RELEASE_11 RELEASE_11}. + * RELEASE_9} through {@link SourceVersion#RELEASE_12 RELEASE_12}. * * Visit methods call {@link #defaultAction * defaultAction} passing their arguments to {@code defaultAction}'s @@ -68,7 +68,7 @@ * @see SimpleAnnotationValueVisitor8 * @since 9 */ -@SupportedSourceVersion(RELEASE_11) +@SupportedSourceVersion(RELEASE_12) public class SimpleAnnotationValueVisitor9<R, P> extends SimpleAnnotationValueVisitor8<R, P> { /** * Constructor for concrete subclasses; uses {@code null} for the diff -r cc58f1fa0438 src/java.compiler/share/classes/javax/lang/model/util/SimpleElementVisitor9.java --- a/src/java.compiler/share/classes/javax/lang/model/util/SimpleElementVisitor9.java Tue Jun 19 09:34:41 2018 +0200 +++ b/src/java.compiler/share/classes/javax/lang/model/util/SimpleElementVisitor9.java Tue Jun 19 16:17:24 2018 -0700 @@ -33,7 +33,7 @@ /** * A simple visitor of program elements with default behavior * appropriate for source versions {@link SourceVersion#RELEASE_9 - * RELEASE_9} through {@link SourceVersion#RELEASE_11 RELEASE_11}. + * RELEASE_9} through {@link SourceVersion#RELEASE_12 RELEASE_12}. * * Visit methods corresponding to {@code RELEASE_9} and earlier * language constructs call {@link #defaultAction defaultAction}, @@ -73,7 +73,7 @@ * @since 9 * @spec JPMS */ -@SupportedSourceVersion(RELEASE_11) +@SupportedSourceVersion(RELEASE_12) public class SimpleElementVisitor9<R, P> extends SimpleElementVisitor8<R, P> { /** * Constructor for concrete subclasses; uses {@code null} for the diff -r cc58f1fa0438 src/java.compiler/share/classes/javax/lang/model/util/SimpleTypeVisitor9.java --- a/src/java.compiler/share/classes/javax/lang/model/util/SimpleTypeVisitor9.java Tue Jun 19 09:34:41 2018 +0200 +++ b/src/java.compiler/share/classes/javax/lang/model/util/SimpleTypeVisitor9.java Tue Jun 19 16:17:24 2018 -0700 @@ -33,7 +33,7 @@ /** * A simple visitor of types with default behavior appropriate for * source versions {@link SourceVersion#RELEASE_9 RELEASE_9} through - * {@link SourceVersion#RELEASE_11 RELEASE_11}. + * {@link SourceVersion#RELEASE_12 RELEASE_12}. * * Visit methods corresponding to {@code RELEASE_9} and earlier * language constructs call {@link #defaultAction defaultAction}, @@ -73,7 +73,7 @@ * @see SimpleTypeVisitor8 * @since 9 */ -@SupportedSourceVersion(RELEASE_11) +@SupportedSourceVersion(RELEASE_12) public class SimpleTypeVisitor9<R, P> extends SimpleTypeVisitor8<R, P> { /** * Constructor for concrete subclasses; uses {@code null} for the diff -r cc58f1fa0438 src/java.compiler/share/classes/javax/lang/model/util/TypeKindVisitor9.java --- a/src/java.compiler/share/classes/javax/lang/model/util/TypeKindVisitor9.java Tue Jun 19 09:34:41 2018 +0200 +++ b/src/java.compiler/share/classes/javax/lang/model/util/TypeKindVisitor9.java Tue Jun 19 16:17:24 2018 -0700 @@ -34,7 +34,7 @@ * A visitor of types based on their {@linkplain TypeKind kind} with * default behavior appropriate for source versions {@link * SourceVersion#RELEASE_9 RELEASE_9} through {@link - * SourceVersion#RELEASE_11 RELEASE_11}. + * SourceVersion#RELEASE_12 RELEASE_12}. * * For {@linkplain * TypeMirror types} <code><i>Xyz</i></code> that may have more than one @@ -77,7 +77,7 @@ * @see TypeKindVisitor8 * @since 9 */ -@SupportedSourceVersion(RELEASE_11) +@SupportedSourceVersion(RELEASE_12) public class TypeKindVisitor9<R, P> extends TypeKindVisitor8<R, P> { /** * Constructor for concrete subclasses to call; uses {@code null}
|