From 99332f8fe03ef3007eee546f095f56094b8921a2 Mon Sep 17 00:00:00 2001 From: Joe Darcy Date: Fri, 8 Dec 2017 11:05:42 -0800 Subject: [PATCH] 8193194: Update javax.lang.model.util visitors for 10 Reviewed-by: jjg --- .../model/util/AbstractAnnotationValueVisitor9.java | 6 +++--- .../javax/lang/model/util/AbstractElementVisitor9.java | 4 ++-- .../javax/lang/model/util/AbstractTypeVisitor9.java | 10 +++++----- .../javax/lang/model/util/ElementKindVisitor9.java | 5 +++-- .../classes/javax/lang/model/util/ElementScanner9.java | 5 +++-- .../lang/model/util/SimpleAnnotationValueVisitor9.java | 7 ++++--- .../javax/lang/model/util/SimpleElementVisitor9.java | 4 ++-- .../javax/lang/model/util/SimpleTypeVisitor9.java | 5 +++-- .../javax/lang/model/util/TypeKindVisitor9.java | 5 +++-- 9 files changed, 28 insertions(+), 23 deletions(-) diff --git a/src/java.compiler/share/classes/javax/lang/model/util/AbstractAnnotationValueVisitor9.java b/src/java.compiler/share/classes/javax/lang/model/util/AbstractAnnotationValueVisitor9.java index 46b2875b42d..c05736913e7 100644 --- a/src/java.compiler/share/classes/javax/lang/model/util/AbstractAnnotationValueVisitor9.java +++ b/src/java.compiler/share/classes/javax/lang/model/util/AbstractAnnotationValueVisitor9.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -32,7 +32,7 @@ import javax.annotation.processing.SupportedSourceVersion; /** * A skeletal visitor for annotation values with default behavior * appropriate for the {@link SourceVersion#RELEASE_9 RELEASE_9} - * source version. + * and {@link SourceVersion#RELEASE_10 RELEASE_10} source versions. * *

WARNING: The {@code AnnotationValueVisitor} interface * implemented by this class may have methods added to it in the @@ -59,7 +59,7 @@ import javax.annotation.processing.SupportedSourceVersion; * @see AbstractAnnotationValueVisitor8 * @since 9 */ -@SupportedSourceVersion(RELEASE_9) +@SupportedSourceVersion(RELEASE_10) public abstract class AbstractAnnotationValueVisitor9 extends AbstractAnnotationValueVisitor8 { /** diff --git a/src/java.compiler/share/classes/javax/lang/model/util/AbstractElementVisitor9.java b/src/java.compiler/share/classes/javax/lang/model/util/AbstractElementVisitor9.java index 9adc95b49cb..556c897c950 100644 --- a/src/java.compiler/share/classes/javax/lang/model/util/AbstractElementVisitor9.java +++ b/src/java.compiler/share/classes/javax/lang/model/util/AbstractElementVisitor9.java @@ -34,7 +34,7 @@ import static javax.lang.model.SourceVersion.*; /** * A skeletal visitor of program elements with default behavior * appropriate for the {@link SourceVersion#RELEASE_9 RELEASE_9} - * source version. + * and {@link SourceVersion#RELEASE_10 RELEASE_10} source versions. * *

WARNING: The {@code ElementVisitor} interface * implemented by this class may have methods added to it in the @@ -65,7 +65,7 @@ import static javax.lang.model.SourceVersion.*; * @since 9 * @spec JPMS */ -@SupportedSourceVersion(RELEASE_9) +@SupportedSourceVersion(RELEASE_10) public abstract class AbstractElementVisitor9 extends AbstractElementVisitor8 { /** * Constructor for concrete subclasses to call. diff --git a/src/java.compiler/share/classes/javax/lang/model/util/AbstractTypeVisitor9.java b/src/java.compiler/share/classes/javax/lang/model/util/AbstractTypeVisitor9.java index d268e867d0a..b38a032ada7 100644 --- a/src/java.compiler/share/classes/javax/lang/model/util/AbstractTypeVisitor9.java +++ b/src/java.compiler/share/classes/javax/lang/model/util/AbstractTypeVisitor9.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -27,13 +27,13 @@ package javax.lang.model.util; import javax.annotation.processing.SupportedSourceVersion; import javax.lang.model.type.*; - +import javax.lang.model.SourceVersion; import static javax.lang.model.SourceVersion.*; /** * A skeletal visitor of types with default behavior appropriate for - * the {@link javax.lang.model.SourceVersion#RELEASE_9 RELEASE_9} - * source version. + * the {@link SourceVersion#RELEASE_9 RELEASE_9} + * and {@link SourceVersion#RELEASE_10 RELEASE_10} source versions. * *

WARNING: The {@code TypeVisitor} interface implemented * by this class may have methods added to it in the future to @@ -63,7 +63,7 @@ import static javax.lang.model.SourceVersion.*; * @see AbstractTypeVisitor8 * @since 9 */ -@SupportedSourceVersion(RELEASE_9) +@SupportedSourceVersion(RELEASE_10) public abstract class AbstractTypeVisitor9 extends AbstractTypeVisitor8 { /** * Constructor for concrete subclasses to call. diff --git a/src/java.compiler/share/classes/javax/lang/model/util/ElementKindVisitor9.java b/src/java.compiler/share/classes/javax/lang/model/util/ElementKindVisitor9.java index 9237cc11361..7fc8140e8ec 100644 --- a/src/java.compiler/share/classes/javax/lang/model/util/ElementKindVisitor9.java +++ b/src/java.compiler/share/classes/javax/lang/model/util/ElementKindVisitor9.java @@ -33,7 +33,8 @@ import javax.lang.model.SourceVersion; /** * A visitor of program elements based on their {@linkplain * ElementKind kind} with default behavior appropriate for the {@link - * SourceVersion#RELEASE_9 RELEASE_9} source version. For {@linkplain + * SourceVersion#RELEASE_9 RELEASE_9} and {@link + * SourceVersion#RELEASE_10 RELEASE_10} source versions. For {@linkplain * Element elements} Xyz that may have more than one * kind, the visitXyz methods in this class delegate * to the visitXyzAsKind method corresponding to the @@ -77,7 +78,7 @@ import javax.lang.model.SourceVersion; * @since 9 * @spec JPMS */ -@SupportedSourceVersion(RELEASE_9) +@SupportedSourceVersion(RELEASE_10) public class ElementKindVisitor9 extends ElementKindVisitor8 { /** * Constructor for concrete subclasses; uses {@code null} for the diff --git a/src/java.compiler/share/classes/javax/lang/model/util/ElementScanner9.java b/src/java.compiler/share/classes/javax/lang/model/util/ElementScanner9.java index dba0a96e383..a5e61046646 100644 --- a/src/java.compiler/share/classes/javax/lang/model/util/ElementScanner9.java +++ b/src/java.compiler/share/classes/javax/lang/model/util/ElementScanner9.java @@ -34,7 +34,8 @@ import static javax.lang.model.SourceVersion.*; /** * A scanning visitor of program elements with default behavior * appropriate for the {@link SourceVersion#RELEASE_9 RELEASE_9} - * source version. The visitXyz methods in this + * and {@link SourceVersion#RELEASE_10 RELEASE_10} source versions. + * The visitXyz methods in this * class scan their component elements by calling {@code scan} on * their {@linkplain Element#getEnclosedElements enclosed elements}, * {@linkplain ExecutableElement#getParameters parameters}, etc., as @@ -90,7 +91,7 @@ import static javax.lang.model.SourceVersion.*; * @since 9 * @spec JPMS */ -@SupportedSourceVersion(RELEASE_9) +@SupportedSourceVersion(RELEASE_10) public class ElementScanner9 extends ElementScanner8 { /** * Constructor for concrete subclasses; uses {@code null} for the diff --git a/src/java.compiler/share/classes/javax/lang/model/util/SimpleAnnotationValueVisitor9.java b/src/java.compiler/share/classes/javax/lang/model/util/SimpleAnnotationValueVisitor9.java index d5cf8e0cfd0..adb172e092e 100644 --- a/src/java.compiler/share/classes/javax/lang/model/util/SimpleAnnotationValueVisitor9.java +++ b/src/java.compiler/share/classes/javax/lang/model/util/SimpleAnnotationValueVisitor9.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -32,7 +32,8 @@ import static javax.lang.model.SourceVersion.*; /** * A simple visitor for annotation values with default behavior * appropriate for the {@link SourceVersion#RELEASE_9 RELEASE_9} - * source version. Visit methods call {@link #defaultAction + * and {@link SourceVersion#RELEASE_10 RELEASE_10} source versions. + * Visit methods call {@link #defaultAction * defaultAction} passing their arguments to {@code defaultAction}'s * corresponding parameters. * @@ -66,7 +67,7 @@ import static javax.lang.model.SourceVersion.*; * @see SimpleAnnotationValueVisitor8 * @since 9 */ -@SupportedSourceVersion(RELEASE_9) +@SupportedSourceVersion(RELEASE_10) public class SimpleAnnotationValueVisitor9 extends SimpleAnnotationValueVisitor8 { /** * Constructor for concrete subclasses; uses {@code null} for the diff --git a/src/java.compiler/share/classes/javax/lang/model/util/SimpleElementVisitor9.java b/src/java.compiler/share/classes/javax/lang/model/util/SimpleElementVisitor9.java index 5c62d078a4c..a73988fb3b4 100644 --- a/src/java.compiler/share/classes/javax/lang/model/util/SimpleElementVisitor9.java +++ b/src/java.compiler/share/classes/javax/lang/model/util/SimpleElementVisitor9.java @@ -33,7 +33,7 @@ import static javax.lang.model.SourceVersion.*; /** * A simple visitor of program elements with default behavior * appropriate for the {@link SourceVersion#RELEASE_9 RELEASE_9} - * source version. + * and {@link SourceVersion#RELEASE_10 RELEASE_10} source versions. * * Visit methods corresponding to {@code RELEASE_9} and earlier * language constructs call {@link #defaultAction defaultAction}, @@ -73,7 +73,7 @@ import static javax.lang.model.SourceVersion.*; * @since 9 * @spec JPMS */ -@SupportedSourceVersion(RELEASE_9) +@SupportedSourceVersion(RELEASE_10) public class SimpleElementVisitor9 extends SimpleElementVisitor8 { /** * Constructor for concrete subclasses; uses {@code null} for the diff --git a/src/java.compiler/share/classes/javax/lang/model/util/SimpleTypeVisitor9.java b/src/java.compiler/share/classes/javax/lang/model/util/SimpleTypeVisitor9.java index 566888c871a..41521e20509 100644 --- a/src/java.compiler/share/classes/javax/lang/model/util/SimpleTypeVisitor9.java +++ b/src/java.compiler/share/classes/javax/lang/model/util/SimpleTypeVisitor9.java @@ -32,7 +32,8 @@ import static javax.lang.model.SourceVersion.*; /** * A simple visitor of types with default behavior appropriate for the - * {@link SourceVersion#RELEASE_9 RELEASE_9} source version. + * {@link SourceVersion#RELEASE_9 RELEASE_9} and + * {@link SourceVersion#RELEASE_10 RELEASE_10} source versions. * * Visit methods corresponding to {@code RELEASE_9} and earlier * language constructs call {@link #defaultAction defaultAction}, @@ -71,7 +72,7 @@ import static javax.lang.model.SourceVersion.*; * @see SimpleTypeVisitor7 * @since 9 */ -@SupportedSourceVersion(RELEASE_9) +@SupportedSourceVersion(RELEASE_10) public class SimpleTypeVisitor9 extends SimpleTypeVisitor8 { /** * Constructor for concrete subclasses; uses {@code null} for the diff --git a/src/java.compiler/share/classes/javax/lang/model/util/TypeKindVisitor9.java b/src/java.compiler/share/classes/javax/lang/model/util/TypeKindVisitor9.java index 5e5c52e5a80..321a7fa311a 100644 --- a/src/java.compiler/share/classes/javax/lang/model/util/TypeKindVisitor9.java +++ b/src/java.compiler/share/classes/javax/lang/model/util/TypeKindVisitor9.java @@ -33,7 +33,8 @@ import static javax.lang.model.SourceVersion.*; /** * A visitor of types based on their {@linkplain TypeKind kind} with * default behavior appropriate for the {@link SourceVersion#RELEASE_9 - * RELEASE_9} source version. For {@linkplain + * RELEASE_9} and {@link SourceVersion#RELEASE_10 RELEASE_10} source + * versions. For {@linkplain * TypeMirror types} Xyz that may have more than one * kind, the visitXyz methods in this class delegate * to the visitXyzAsKind method corresponding to the @@ -74,7 +75,7 @@ import static javax.lang.model.SourceVersion.*; * @see TypeKindVisitor8 * @since 9 */ -@SupportedSourceVersion(RELEASE_9) +@SupportedSourceVersion(RELEASE_10) public class TypeKindVisitor9 extends TypeKindVisitor8 { /** * Constructor for concrete subclasses to call; uses {@code null}