--- old/src/share/classes/javax/lang/model/util/AbstractAnnotationValueVisitor6.java 2011-06-02 20:34:45.000000000 -0700
+++ new/src/share/classes/javax/lang/model/util/AbstractAnnotationValueVisitor6.java 2011-06-02 20:34:45.000000000 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2011, 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
@@ -64,6 +64,7 @@
* @author Peter von der Ahé
*
* @see AbstractAnnotationValueVisitor7
+ * @see AbstractAnnotationValueVisitor8
* @since 1.6
*/
@SupportedSourceVersion(RELEASE_6)
--- old/src/share/classes/javax/lang/model/util/AbstractAnnotationValueVisitor7.java 2011-06-02 20:34:45.000000000 -0700
+++ new/src/share/classes/javax/lang/model/util/AbstractAnnotationValueVisitor7.java 2011-06-02 20:34:45.000000000 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2011 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
@@ -59,6 +59,7 @@
* @param
the type of the additional parameter to this visitor's methods.
*
* @see AbstractAnnotationValueVisitor6
+ * @see AbstractAnnotationValueVisitor8
* @since 1.7
*/
@SupportedSourceVersion(RELEASE_7)
--- old/src/share/classes/javax/lang/model/util/AbstractElementVisitor6.java 2011-06-02 20:34:46.000000000 -0700
+++ new/src/share/classes/javax/lang/model/util/AbstractElementVisitor6.java 2011-06-02 20:34:46.000000000 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2011, 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
@@ -67,6 +67,7 @@
* @author Peter von der Ahé
*
* @see AbstractElementVisitor7
+ * @see AbstractElementVisitor8
* @since 1.6
*/
@SupportedSourceVersion(RELEASE_6)
--- old/src/share/classes/javax/lang/model/util/AbstractElementVisitor7.java 2011-06-02 20:34:46.000000000 -0700
+++ new/src/share/classes/javax/lang/model/util/AbstractElementVisitor7.java 2011-06-02 20:34:46.000000000 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2011, 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
@@ -62,6 +62,7 @@
* additional parameter.
*
* @see AbstractElementVisitor6
+ * @see AbstractElementVisitor8
* @since 1.7
*/
@SupportedSourceVersion(RELEASE_7)
--- old/src/share/classes/javax/lang/model/util/AbstractTypeVisitor6.java 2011-06-02 20:34:46.000000000 -0700
+++ new/src/share/classes/javax/lang/model/util/AbstractTypeVisitor6.java 2011-06-02 20:34:46.000000000 -0700
@@ -60,6 +60,7 @@
* @author Peter von der Ahé
*
* @see AbstractTypeVisitor7
+ * @see AbstractTypeVisitor8
* @since 1.6
*/
public abstract class AbstractTypeVisitor6 implements TypeVisitor {
--- old/src/share/classes/javax/lang/model/util/AbstractTypeVisitor7.java 2011-06-02 20:34:47.000000000 -0700
+++ new/src/share/classes/javax/lang/model/util/AbstractTypeVisitor7.java 2011-06-02 20:34:47.000000000 -0700
@@ -56,6 +56,7 @@
* additional parameter.
*
* @see AbstractTypeVisitor6
+ * @see AbstractTypeVisitor8
* @since 1.7
*/
public abstract class AbstractTypeVisitor7 extends AbstractTypeVisitor6 {
--- old/src/share/classes/javax/lang/model/util/ElementKindVisitor6.java 2011-06-02 20:34:47.000000000 -0700
+++ new/src/share/classes/javax/lang/model/util/ElementKindVisitor6.java 2011-06-02 20:34:47.000000000 -0700
@@ -78,6 +78,7 @@
* @author Peter von der Ahé
*
* @see ElementKindVisitor7
+ * @see ElementKindVisitor8
* @since 1.6
*/
@SupportedSourceVersion(RELEASE_6)
--- old/src/share/classes/javax/lang/model/util/ElementKindVisitor7.java 2011-06-02 20:34:48.000000000 -0700
+++ new/src/share/classes/javax/lang/model/util/ElementKindVisitor7.java 2011-06-02 20:34:48.000000000 -0700
@@ -73,6 +73,7 @@
* additional parameter.
*
* @see ElementKindVisitor6
+ * @see ElementKindVisitor8
* @since 1.7
*/
@SupportedSourceVersion(RELEASE_7)
--- old/src/share/classes/javax/lang/model/util/ElementScanner6.java 2011-06-02 20:34:48.000000000 -0700
+++ new/src/share/classes/javax/lang/model/util/ElementScanner6.java 2011-06-02 20:34:48.000000000 -0700
@@ -90,6 +90,7 @@
* @author Peter von der Ahé
*
* @see ElementScanner7
+ * @see ElementScanner8
* @since 1.6
*/
@SupportedSourceVersion(RELEASE_6)
--- old/src/share/classes/javax/lang/model/util/ElementScanner7.java 2011-06-02 20:34:49.000000000 -0700
+++ new/src/share/classes/javax/lang/model/util/ElementScanner7.java 2011-06-02 20:34:48.000000000 -0700
@@ -86,6 +86,7 @@
* additional parameter.
*
* @see ElementScanner6
+ * @see ElementScanner8
* @since 1.7
*/
@SupportedSourceVersion(RELEASE_7)
--- old/src/share/classes/javax/lang/model/util/SimpleAnnotationValueVisitor6.java 2011-06-02 20:34:49.000000000 -0700
+++ new/src/share/classes/javax/lang/model/util/SimpleAnnotationValueVisitor6.java 2011-06-02 20:34:49.000000000 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2011, 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
@@ -71,6 +71,7 @@
* @author Peter von der Ahé
*
* @see SimpleAnnotationValueVisitor7
+ * @see SimpleAnnotationValueVisitor8
* @since 1.6
*/
@SupportedSourceVersion(RELEASE_6)
--- old/src/share/classes/javax/lang/model/util/SimpleAnnotationValueVisitor7.java 2011-06-02 20:34:49.000000000 -0700
+++ new/src/share/classes/javax/lang/model/util/SimpleAnnotationValueVisitor7.java 2011-06-02 20:34:49.000000000 -0700
@@ -66,6 +66,7 @@
* @param the type of the additional parameter to this visitor's methods.
*
* @see SimpleAnnotationValueVisitor6
+ * @see SimpleAnnotationValueVisitor8
* @since 1.7
*/
@SupportedSourceVersion(RELEASE_7)
--- old/src/share/classes/javax/lang/model/util/SimpleElementVisitor6.java 2011-06-02 20:34:50.000000000 -0700
+++ new/src/share/classes/javax/lang/model/util/SimpleElementVisitor6.java 2011-06-02 20:34:50.000000000 -0700
@@ -76,6 +76,7 @@
* @author Peter von der Ahé
*
* @see SimpleElementVisitor7
+ * @see SimpleElementVisitor8
* @since 1.6
*/
@SupportedSourceVersion(RELEASE_6)
--- old/src/share/classes/javax/lang/model/util/SimpleElementVisitor7.java 2011-06-02 20:34:50.000000000 -0700
+++ new/src/share/classes/javax/lang/model/util/SimpleElementVisitor7.java 2011-06-02 20:34:50.000000000 -0700
@@ -69,6 +69,7 @@
* for visitors that do not need an additional parameter.
*
* @see SimpleElementVisitor6
+ * @see SimpleElementVisitor8
* @since 1.7
*/
@SupportedSourceVersion(RELEASE_7)
--- old/src/share/classes/javax/lang/model/util/SimpleTypeVisitor6.java 2011-06-02 20:34:50.000000000 -0700
+++ new/src/share/classes/javax/lang/model/util/SimpleTypeVisitor6.java 2011-06-02 20:34:50.000000000 -0700
@@ -75,6 +75,7 @@
* @author Peter von der Ahé
*
* @see SimpleTypeVisitor7
+ * @see SimpleTypeVisitor8
* @since 1.6
*/
@SupportedSourceVersion(RELEASE_6)
--- old/src/share/classes/javax/lang/model/util/SimpleTypeVisitor7.java 2011-06-02 20:34:51.000000000 -0700
+++ new/src/share/classes/javax/lang/model/util/SimpleTypeVisitor7.java 2011-06-02 20:34:51.000000000 -0700
@@ -68,6 +68,7 @@
* additional parameter.
*
* @see SimpleTypeVisitor6
+ * @see SimpleTypeVisitor8
* @since 1.7
*/
@SupportedSourceVersion(RELEASE_7)
--- old/src/share/classes/javax/lang/model/util/TypeKindVisitor6.java 2011-06-02 20:34:51.000000000 -0700
+++ new/src/share/classes/javax/lang/model/util/TypeKindVisitor6.java 2011-06-02 20:34:51.000000000 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2011, 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
@@ -76,6 +76,7 @@
* @author Peter von der Ahé
*
* @see TypeKindVisitor7
+ * @see TypeKindVisitor8
* @since 1.6
*/
@SupportedSourceVersion(RELEASE_6)
--- old/src/share/classes/javax/lang/model/util/TypeKindVisitor7.java 2011-06-02 20:34:52.000000000 -0700
+++ new/src/share/classes/javax/lang/model/util/TypeKindVisitor7.java 2011-06-02 20:34:52.000000000 -0700
@@ -71,6 +71,7 @@
* additional parameter.
*
* @see TypeKindVisitor6
+ * @see TypeKindVisitor8
* @since 1.7
*/
@SupportedSourceVersion(RELEASE_7)
--- /dev/null 2011-05-20 03:59:15.161965143 -0700
+++ new/src/share/classes/javax/lang/model/util/AbstractAnnotationValueVisitor8.java 2011-06-02 20:34:52.000000000 -0700
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2011, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package javax.lang.model.util;
+
+import java.util.List;
+import javax.lang.model.element.*;
+
+import javax.lang.model.type.TypeMirror;
+import static javax.lang.model.SourceVersion.*;
+import javax.lang.model.SourceVersion;
+import javax.annotation.processing.SupportedSourceVersion;
+
+/**
+ * A skeletal visitor for annotation values with default behavior
+ * appropriate for the {@link SourceVersion#RELEASE_8 RELEASE_8}
+ * source version.
+ *
+ *
WARNING: The {@code AnnotationValueVisitor} interface
+ * implemented by this class may have methods added to it in the
+ * future to accommodate new, currently unknown, language structures
+ * added to future versions of the Java™ programming language.
+ * Therefore, methods whose names begin with {@code "visit"} may be
+ * added to this class in the future; to avoid incompatibilities,
+ * classes which extend this class should not declare any instance
+ * methods with names beginning with {@code "visit"}.
+ *
+ *
When such a new visit method is added, the default
+ * implementation in this class will be to call the {@link
+ * #visitUnknown visitUnknown} method. A new abstract annotation
+ * value visitor class will also be introduced to correspond to the
+ * new language level; this visitor will have different default
+ * behavior for the visit method in question. When the new visitor is
+ * introduced, all or portions of this visitor may be deprecated.
+ *
+ * @param the return type of this visitor's methods
+ * @param the type of the additional parameter to this visitor's methods.
+ *
+ * @see AbstractAnnotationValueVisitor6
+ * @see AbstractAnnotationValueVisitor7
+ * @since 1.8
+ */
+@SupportedSourceVersion(RELEASE_8)
+public abstract class AbstractAnnotationValueVisitor8 extends AbstractAnnotationValueVisitor7 {
+
+ /**
+ * Constructor for concrete subclasses to call.
+ */
+ protected AbstractAnnotationValueVisitor8() {
+ super();
+ }
+}
--- /dev/null 2011-05-20 03:59:15.161965143 -0700
+++ new/src/share/classes/javax/lang/model/util/AbstractElementVisitor8.java 2011-06-02 20:34:52.000000000 -0700
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2011, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package javax.lang.model.util;
+
+import javax.lang.model.element.*;
+import javax.annotation.processing.SupportedSourceVersion;
+import javax.lang.model.element.*;
+import static javax.lang.model.element.ElementKind.*;
+import static javax.lang.model.SourceVersion.*;
+import javax.lang.model.SourceVersion;
+
+
+/**
+ * A skeletal visitor of program elements with default behavior
+ * appropriate for the {@link SourceVersion#RELEASE_8 RELEASE_8}
+ * source version.
+ *
+ * WARNING: The {@code ElementVisitor} interface
+ * implemented by this class may have methods added to it in the
+ * future to accommodate new, currently unknown, language structures
+ * added to future versions of the Java™ programming language.
+ * Therefore, methods whose names begin with {@code "visit"} may be
+ * added to this class in the future; to avoid incompatibilities,
+ * classes which extend this class should not declare any instance
+ * methods with names beginning with {@code "visit"}.
+ *
+ *
When such a new visit method is added, the default
+ * implementation in this class will be to call the {@link
+ * #visitUnknown visitUnknown} method. A new abstract element visitor
+ * class will also be introduced to correspond to the new language
+ * level; this visitor will have different default behavior for the
+ * visit method in question. When the new visitor is introduced, all
+ * or portions of this visitor may be deprecated.
+ *
+ * @param the return type of this visitor's methods. Use {@link
+ * Void} for visitors that do not need to return results.
+ * @param the type of the additional parameter to this visitor's
+ * methods. Use {@code Void} for visitors that do not need an
+ * additional parameter.
+ *
+ * @see AbstractElementVisitor6
+ * @see AbstractElementVisitor7
+ * @since 1.8
+ */
+@SupportedSourceVersion(RELEASE_8)
+public abstract class AbstractElementVisitor8 extends AbstractElementVisitor7 {
+ /**
+ * Constructor for concrete subclasses to call.
+ */
+ protected AbstractElementVisitor8(){
+ super();
+ }
+}
--- /dev/null 2011-05-20 03:59:15.161965143 -0700
+++ new/src/share/classes/javax/lang/model/util/AbstractTypeVisitor8.java 2011-06-02 20:34:53.000000000 -0700
@@ -0,0 +1,69 @@
+/*
+ * Copyright (c) 2011 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package javax.lang.model.util;
+
+import javax.lang.model.type.*;
+
+/**
+ * A skeletal visitor of types with default behavior appropriate for
+ * the {@link javax.lang.model.SourceVersion#RELEASE_8 RELEASE_8}
+ * source version.
+ *
+ * WARNING: The {@code TypeVisitor} interface implemented
+ * by this class may have methods added to it in the future to
+ * accommodate new, currently unknown, language structures added to
+ * future versions of the Java™ programming language.
+ * Therefore, methods whose names begin with {@code "visit"} may be
+ * added to this class in the future; to avoid incompatibilities,
+ * classes which extend this class should not declare any instance
+ * methods with names beginning with {@code "visit"}.
+ *
+ *
When such a new visit method is added, the default
+ * implementation in this class will be to call the {@link
+ * #visitUnknown visitUnknown} method. A new abstract type visitor
+ * class will also be introduced to correspond to the new language
+ * level; this visitor will have different default behavior for the
+ * visit method in question. When the new visitor is introduced, all
+ * or portions of this visitor may be deprecated.
+ *
+ * @param the return type of this visitor's methods. Use {@link
+ * Void} for visitors that do not need to return results.
+ * @param the type of the additional parameter to this visitor's
+ * methods. Use {@code Void} for visitors that do not need an
+ * additional parameter.
+ *
+ * @see AbstractTypeVisitor6
+ * @see AbstractTypeVisitor7
+ * @since 1.8
+ */
+public abstract class AbstractTypeVisitor8 extends AbstractTypeVisitor7 {
+ /**
+ * Constructor for concrete subclasses to call.
+ */
+ protected AbstractTypeVisitor8() {
+ super();
+ }
+}
--- /dev/null 2011-05-20 03:59:15.161965143 -0700
+++ new/src/share/classes/javax/lang/model/util/ElementKindVisitor8.java 2011-06-02 20:34:53.000000000 -0700
@@ -0,0 +1,98 @@
+/*
+ * Copyright (c) 2011 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package javax.lang.model.util;
+
+import javax.lang.model.element.*;
+import static javax.lang.model.element.ElementKind.*;
+import javax.annotation.processing.SupportedSourceVersion;
+import static javax.lang.model.SourceVersion.*;
+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_8 RELEASE_8} source version. For {@linkplain
+ * Element elements} XYZ that may have more than one
+ * kind, the visitXYZ methods in this class delegate
+ * to the visitXYZKind method corresponding to the
+ * first argument's kind. The visitXYZKind methods
+ * call {@link #defaultAction defaultAction}, passing their arguments
+ * to {@code defaultAction}'s corresponding parameters.
+ *
+ * Methods in this class may be overridden subject to their
+ * general contract. Note that annotating methods in concrete
+ * subclasses with {@link java.lang.Override @Override} will help
+ * ensure that methods are overridden as intended.
+ *
+ *
WARNING: The {@code ElementVisitor} interface
+ * implemented by this class may have methods added to it or the
+ * {@code ElementKind} {@code enum} used in this case may have
+ * constants added to it in the future to accommodate new, currently
+ * unknown, language structures added to future versions of the
+ * Java™ programming language. Therefore, methods whose names
+ * begin with {@code "visit"} may be added to this class in the
+ * future; to avoid incompatibilities, classes which extend this class
+ * should not declare any instance methods with names beginning with
+ * {@code "visit"}.
+ *
+ *
When such a new visit method is added, the default
+ * implementation in this class will be to call the {@link
+ * #visitUnknown visitUnknown} method. A new abstract element kind
+ * visitor class will also be introduced to correspond to the new
+ * language level; this visitor will have different default behavior
+ * for the visit method in question. When the new visitor is
+ * introduced, all or portions of this visitor may be deprecated.
+ *
+ * @param the return type of this visitor's methods. Use {@link
+ * Void} for visitors that do not need to return results.
+ * @param the type of the additional parameter to this visitor's
+ * methods. Use {@code Void} for visitors that do not need an
+ * additional parameter.
+ *
+ * @see ElementKindVisitor6
+ * @see ElementKindVisitor7
+ * @since 1.8
+ */
+@SupportedSourceVersion(RELEASE_8)
+public class ElementKindVisitor8 extends ElementKindVisitor7 {
+ /**
+ * Constructor for concrete subclasses; uses {@code null} for the
+ * default value.
+ */
+ protected ElementKindVisitor8() {
+ super(null);
+ }
+
+ /**
+ * Constructor for concrete subclasses; uses the argument for the
+ * default value.
+ *
+ * @param defaultValue the value to assign to {@link #DEFAULT_VALUE}
+ */
+ protected ElementKindVisitor8(R defaultValue) {
+ super(defaultValue);
+ }
+}
--- /dev/null 2011-05-20 03:59:15.161965143 -0700
+++ new/src/share/classes/javax/lang/model/util/ElementScanner8.java 2011-06-02 20:34:53.000000000 -0700
@@ -0,0 +1,109 @@
+/*
+ * Copyright (c) 2011, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package javax.lang.model.util;
+
+import javax.lang.model.element.*;
+import javax.annotation.processing.SupportedSourceVersion;
+import static javax.lang.model.element.ElementKind.*;
+import javax.lang.model.SourceVersion;
+import static javax.lang.model.SourceVersion.*;
+
+
+/**
+ * A scanning visitor of program elements with default behavior
+ * appropriate for the {@link SourceVersion#RELEASE_8 RELEASE_8}
+ * source version. 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
+ * indicated in the individual method specifications. A subclass can
+ * control the order elements are visited by overriding the
+ * visitXYZ methods. Note that clients of a scanner
+ * may get the desired behavior be invoking {@code v.scan(e, p)} rather
+ * than {@code v.visit(e, p)} on the root objects of interest.
+ *
+ * When a subclass overrides a visitXYZ method, the
+ * new method can cause the enclosed elements to be scanned in the
+ * default way by calling super.visitXYZ. In this
+ * fashion, the concrete visitor can control the ordering of traversal
+ * over the component elements with respect to the additional
+ * processing; for example, consistently calling
+ * super.visitXYZ at the start of the overridden
+ * methods will yield a preorder traversal, etc. If the component
+ * elements should be traversed in some other order, instead of
+ * calling super.visitXYZ, an overriding visit method
+ * should call {@code scan} with the elements in the desired order.
+ *
+ *
Methods in this class may be overridden subject to their
+ * general contract. Note that annotating methods in concrete
+ * subclasses with {@link java.lang.Override @Override} will help
+ * ensure that methods are overridden as intended.
+ *
+ *
WARNING: The {@code ElementVisitor} interface
+ * implemented by this class may have methods added to it in the
+ * future to accommodate new, currently unknown, language structures
+ * added to future versions of the Java™ programming language.
+ * Therefore, methods whose names begin with {@code "visit"} may be
+ * added to this class in the future; to avoid incompatibilities,
+ * classes which extend this class should not declare any instance
+ * methods with names beginning with {@code "visit"}.
+ *
+ *
When such a new visit method is added, the default
+ * implementation in this class will be to call the {@link
+ * #visitUnknown visitUnknown} method. A new element scanner visitor
+ * class will also be introduced to correspond to the new language
+ * level; this visitor will have different default behavior for the
+ * visit method in question. When the new visitor is introduced, all
+ * or portions of this visitor may be deprecated.
+ *
+ * @param the return type of this visitor's methods. Use {@link
+ * Void} for visitors that do not need to return results.
+ * @param the type of the additional parameter to this visitor's
+ * methods. Use {@code Void} for visitors that do not need an
+ * additional parameter.
+ *
+ * @see ElementScanner6
+ * @see ElementScanner7
+ * @since 1.8
+ */
+@SupportedSourceVersion(RELEASE_8)
+public class ElementScanner8 extends ElementScanner7 {
+ /**
+ * Constructor for concrete subclasses; uses {@code null} for the
+ * default value.
+ */
+ protected ElementScanner8(){
+ super(null);
+ }
+
+ /**
+ * Constructor for concrete subclasses; uses the argument for the
+ * default value.
+ */
+ protected ElementScanner8(R defaultValue){
+ super(defaultValue);
+ }
+}
--- /dev/null 2011-05-20 03:59:15.161965143 -0700
+++ new/src/share/classes/javax/lang/model/util/LatestAbstractAnnotationValueVisitor.java 2011-06-02 20:34:54.000000000 -0700
@@ -0,0 +1,75 @@
+/*
+ * Copyright (c) 2011, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package javax.lang.model.util;
+
+import java.util.List;
+import javax.lang.model.element.*;
+
+import javax.lang.model.type.TypeMirror;
+import static javax.lang.model.SourceVersion.*;
+import javax.lang.model.SourceVersion;
+import javax.annotation.processing.SupportedSourceVersion;
+
+/**
+ * A skeletal visitor for annotation values with default behavior
+ * appropriate for the {@linkplain SourceVersion#latest latest} source
+ * version.
+ *
+ * WARNING: The {@code AnnotationValueVisitor} interface
+ * implemented by this class may have methods added to it in the
+ * future to accommodate new, currently unknown, language structures
+ * added to future versions of the Java™ programming language.
+ * Therefore, methods whose names begin with {@code "visit"} may be
+ * added to this class in the future; to avoid incompatibilities,
+ * classes which extend this class should not declare any instance
+ * methods with names beginning with {@code "visit"}.
+ *
+ *
When such a new visit method is added, the default
+ * implementation in this class will be to call the {@link
+ * #visitUnknown visitUnknown} method. A new abstract annotation
+ * value visitor class will also be introduced to correspond to the
+ * new language level; this visitor will have different default
+ * behavior for the visit method in question. When the new visitor is
+ * introduced, all or portions of this visitor may be deprecated.
+ *
+ * @param the return type of this visitor's methods
+ * @param the type of the additional parameter to this visitor's methods.
+ *
+ * @see AbstractAnnotationValueVisitor6
+ * @see AbstractAnnotationValueVisitor7
+ * @see AbstractAnnotationValueVisitor8
+ * @since 1.8
+ */
+@SupportedSourceVersion(RELEASE_8)
+public abstract class LatestAbstractAnnotationValueVisitor extends AbstractAnnotationValueVisitor8 {
+
+ /**
+ * Constructor for concrete subclasses to call.
+ */
+ protected LatestAbstractAnnotationValueVisitor() {
+ super();
+ }
+}
--- /dev/null 2011-05-20 03:59:15.161965143 -0700
+++ new/src/share/classes/javax/lang/model/util/LatestAbstractElementVisitor.java 2011-06-02 20:34:54.000000000 -0700
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 2011, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package javax.lang.model.util;
+
+import javax.lang.model.element.*;
+import javax.annotation.processing.SupportedSourceVersion;
+import javax.lang.model.element.*;
+import static javax.lang.model.element.ElementKind.*;
+import static javax.lang.model.SourceVersion.*;
+import javax.lang.model.SourceVersion;
+
+
+/**
+ * A skeletal visitor of program elements with default behavior
+ * appropriate for the {@linkplain SourceVersion#latest latest} source
+ * version.
+ *
+ * WARNING: The {@code ElementVisitor} interface
+ * implemented by this class may have methods added to it in the
+ * future to accommodate new, currently unknown, language structures
+ * added to future versions of the Java™ programming language.
+ * Therefore, methods whose names begin with {@code "visit"} may be
+ * added to this class in the future; to avoid incompatibilities,
+ * classes which extend this class should not declare any instance
+ * methods with names beginning with {@code "visit"}.
+ *
+ *
When such a new visit method is added, the default
+ * implementation in this class will be to call the {@link
+ * #visitUnknown visitUnknown} method. A new abstract element visitor
+ * class will also be introduced to correspond to the new language
+ * level; this visitor will have different default behavior for the
+ * visit method in question. When the new visitor is introduced, all
+ * or portions of this visitor may be deprecated.
+ *
+ * @param the return type of this visitor's methods. Use {@link
+ * Void} for visitors that do not need to return results.
+ * @param the type of the additional parameter to this visitor's
+ * methods. Use {@code Void} for visitors that do not need an
+ * additional parameter.
+ *
+ * @see AbstractElementVisitor6
+ * @see AbstractElementVisitor7
+ * @see AbstractElementVisitor8
+ * @since 1.8
+ */
+@SupportedSourceVersion(RELEASE_8)
+public abstract class LatestAbstractElementVisitor extends AbstractElementVisitor8 {
+ /**
+ * Constructor for concrete subclasses to call.
+ */
+ protected LatestAbstractElementVisitor(){
+ super();
+ }
+}
--- /dev/null 2011-05-20 03:59:15.161965143 -0700
+++ new/src/share/classes/javax/lang/model/util/LatestAbstractTypeVisitor.java 2011-06-02 20:34:54.000000000 -0700
@@ -0,0 +1,70 @@
+/*
+ * Copyright (c) 2011 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package javax.lang.model.util;
+
+import javax.lang.model.type.*;
+
+/**
+ * A skeletal visitor of types with default behavior appropriate for
+ * the {@linkplain javax.lang.model.SourceVersion#latest() latest}
+ * source version.
+ *
+ * WARNING: The {@code TypeVisitor} interface implemented
+ * by this class may have methods added to it in the future to
+ * accommodate new, currently unknown, language structures added to
+ * future versions of the Java™ programming language.
+ * Therefore, methods whose names begin with {@code "visit"} may be
+ * added to this class in the future; to avoid incompatibilities,
+ * classes which extend this class should not declare any instance
+ * methods with names beginning with {@code "visit"}.
+ *
+ *
When such a new visit method is added, the default
+ * implementation in this class will be to call the {@link
+ * #visitUnknown visitUnknown} method. A new abstract type visitor
+ * class will also be introduced to correspond to the new language
+ * level; this visitor will have different default behavior for the
+ * visit method in question. When the new visitor is introduced, all
+ * or portions of this visitor may be deprecated.
+ *
+ * @param the return type of this visitor's methods. Use {@link
+ * Void} for visitors that do not need to return results.
+ * @param the type of the additional parameter to this visitor's
+ * methods. Use {@code Void} for visitors that do not need an
+ * additional parameter.
+ *
+ * @see AbstractTypeVisitor6
+ * @see AbstractTypeVisitor7
+ * @see AbstractTypeVisitor8
+ * @since 1.8
+ */
+public abstract class LatestAbstractTypeVisitor extends AbstractTypeVisitor8 {
+ /**
+ * Constructor for concrete subclasses to call.
+ */
+ protected LatestAbstractTypeVisitor() {
+ super();
+ }
+}
--- /dev/null 2011-05-20 03:59:15.161965143 -0700
+++ new/src/share/classes/javax/lang/model/util/LatestElementKindVisitor.java 2011-06-02 20:34:55.000000000 -0700
@@ -0,0 +1,100 @@
+/*
+ * Copyright (c) 2011 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package javax.lang.model.util;
+
+import javax.lang.model.element.*;
+import static javax.lang.model.element.ElementKind.*;
+import javax.annotation.processing.SupportedSourceVersion;
+import static javax.lang.model.SourceVersion.*;
+import javax.lang.model.SourceVersion;
+
+/**
+ * A visitor of program elements based on their {@linkplain
+ * ElementKind kind} with default behavior appropriate for the
+ * {@linkplain SourceVersion#latest latest} source version. For
+ * {@linkplain Element elements} XYZ that may have
+ * more than one kind, the visitXYZ methods in this
+ * class delegate to the visitXYZKind method
+ * corresponding to the first argument's kind. The
+ * visitXYZKind methods call {@link #defaultAction
+ * defaultAction}, passing their arguments to {@code defaultAction}'s
+ * corresponding parameters.
+ *
+ * Methods in this class may be overridden subject to their
+ * general contract. Note that annotating methods in concrete
+ * subclasses with {@link java.lang.Override @Override} will help
+ * ensure that methods are overridden as intended.
+ *
+ *
WARNING: The {@code ElementVisitor} interface
+ * implemented by this class may have methods added to it or the
+ * {@code ElementKind} {@code enum} used in this case may have
+ * constants added to it in the future to accommodate new, currently
+ * unknown, language structures added to future versions of the
+ * Java™ programming language. Therefore, methods whose names
+ * begin with {@code "visit"} may be added to this class in the
+ * future; to avoid incompatibilities, classes which extend this class
+ * should not declare any instance methods with names beginning with
+ * {@code "visit"}.
+ *
+ *
When such a new visit method is added, the default
+ * implementation in this class will be to call the {@link
+ * #visitUnknown visitUnknown} method. A new abstract element kind
+ * visitor class will also be introduced to correspond to the new
+ * language level; this visitor will have different default behavior
+ * for the visit method in question. When the new visitor is
+ * introduced, all or portions of this visitor may be deprecated.
+ *
+ * @param the return type of this visitor's methods. Use {@link
+ * Void} for visitors that do not need to return results.
+ * @param the type of the additional parameter to this visitor's
+ * methods. Use {@code Void} for visitors that do not need an
+ * additional parameter.
+ *
+ * @see ElementKindVisitor6
+ * @see ElementKindVisitor7
+ * @see ElementKindVisitor8
+ * @since 1.8
+ */
+@SupportedSourceVersion(RELEASE_8)
+public class LatestElementKindVisitor extends ElementKindVisitor8 {
+ /**
+ * Constructor for concrete subclasses; uses {@code null} for the
+ * default value.
+ */
+ protected LatestElementKindVisitor() {
+ super(null);
+ }
+
+ /**
+ * Constructor for concrete subclasses; uses the argument for the
+ * default value.
+ *
+ * @param defaultValue the value to assign to {@link #DEFAULT_VALUE}
+ */
+ protected LatestElementKindVisitor(R defaultValue) {
+ super(defaultValue);
+ }
+}
--- /dev/null 2011-05-20 03:59:15.161965143 -0700
+++ new/src/share/classes/javax/lang/model/util/LatestElementScanner.java 2011-06-02 20:34:55.000000000 -0700
@@ -0,0 +1,110 @@
+/*
+ * Copyright (c) 2011, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package javax.lang.model.util;
+
+import javax.lang.model.element.*;
+import javax.annotation.processing.SupportedSourceVersion;
+import static javax.lang.model.element.ElementKind.*;
+import javax.lang.model.SourceVersion;
+import static javax.lang.model.SourceVersion.*;
+
+
+/**
+ * A scanning visitor of program elements with default behavior
+ * appropriate for the {@linkplain SourceVersion#latest latest}
+ * source version. 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
+ * indicated in the individual method specifications. A subclass can
+ * control the order elements are visited by overriding the
+ * visitXYZ methods. Note that clients of a scanner
+ * may get the desired behavior be invoking {@code v.scan(e, p)} rather
+ * than {@code v.visit(e, p)} on the root objects of interest.
+ *
+ * When a subclass overrides a visitXYZ method, the
+ * new method can cause the enclosed elements to be scanned in the
+ * default way by calling super.visitXYZ. In this
+ * fashion, the concrete visitor can control the ordering of traversal
+ * over the component elements with respect to the additional
+ * processing; for example, consistently calling
+ * super.visitXYZ at the start of the overridden
+ * methods will yield a preorder traversal, etc. If the component
+ * elements should be traversed in some other order, instead of
+ * calling super.visitXYZ, an overriding visit method
+ * should call {@code scan} with the elements in the desired order.
+ *
+ *
Methods in this class may be overridden subject to their
+ * general contract. Note that annotating methods in concrete
+ * subclasses with {@link java.lang.Override @Override} will help
+ * ensure that methods are overridden as intended.
+ *
+ *
WARNING: The {@code ElementVisitor} interface
+ * implemented by this class may have methods added to it in the
+ * future to accommodate new, currently unknown, language structures
+ * added to future versions of the Java™ programming language.
+ * Therefore, methods whose names begin with {@code "visit"} may be
+ * added to this class in the future; to avoid incompatibilities,
+ * classes which extend this class should not declare any instance
+ * methods with names beginning with {@code "visit"}.
+ *
+ *
When such a new visit method is added, the default
+ * implementation in this class will be to call the {@link
+ * #visitUnknown visitUnknown} method. A new element scanner visitor
+ * class will also be introduced to correspond to the new language
+ * level; this visitor will have different default behavior for the
+ * visit method in question. When the new visitor is introduced, all
+ * or portions of this visitor may be deprecated.
+ *
+ * @param the return type of this visitor's methods. Use {@link
+ * Void} for visitors that do not need to return results.
+ * @param the type of the additional parameter to this visitor's
+ * methods. Use {@code Void} for visitors that do not need an
+ * additional parameter.
+ *
+ * @see ElementScanner6
+ * @see ElementScanner7
+ * @see ElementScanner8
+ * @since 1.8
+ */
+@SupportedSourceVersion(RELEASE_8)
+public class LatestElementScanner extends ElementScanner8 {
+ /**
+ * Constructor for concrete subclasses; uses {@code null} for the
+ * default value.
+ */
+ protected LatestElementScanner(){
+ super(null);
+ }
+
+ /**
+ * Constructor for concrete subclasses; uses the argument for the
+ * default value.
+ */
+ protected LatestElementScanner(R defaultValue){
+ super(defaultValue);
+ }
+}
--- /dev/null 2011-05-20 03:59:15.161965143 -0700
+++ new/src/share/classes/javax/lang/model/util/LatestSimpleAnnotationValueVisitor.java 2011-06-02 20:34:55.000000000 -0700
@@ -0,0 +1,92 @@
+/*
+ * Copyright (c) 2011, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package javax.lang.model.util;
+
+import java.util.List;
+import javax.lang.model.element.*;
+
+import javax.lang.model.type.TypeMirror;
+import static javax.lang.model.SourceVersion.*;
+import javax.lang.model.SourceVersion;
+import javax.annotation.processing.SupportedSourceVersion;
+
+/**
+ * A simple visitor for annotation values with default behavior
+ * appropriate for the {@linkplain SourceVersion#latest latest}
+ * source version. Visit methods call {@link #defaultAction
+ * defaultAction} passing their arguments to {@code defaultAction}'s
+ * corresponding parameters.
+ *
+ * Methods in this class may be overridden subject to their
+ * general contract. Note that annotating methods in concrete
+ * subclasses with {@link java.lang.Override @Override} will help
+ * ensure that methods are overridden as intended.
+ *
+ *
WARNING: The {@code AnnotationValueVisitor} interface
+ * implemented by this class may have methods added to it in the
+ * future to accommodate new, currently unknown, language structures
+ * added to future versions of the Java™ programming language.
+ * Therefore, methods whose names begin with {@code "visit"} may be
+ * added to this class in the future; to avoid incompatibilities,
+ * classes which extend this class should not declare any instance
+ * methods with names beginning with {@code "visit"}.
+ *
+ *
When such a new visit method is added, the default
+ * implementation in this class will be to call the {@link
+ * #visitUnknown visitUnknown} method. A new simple annotation
+ * value visitor class will also be introduced to correspond to the
+ * new language level; this visitor will have different default
+ * behavior for the visit method in question. When the new visitor is
+ * introduced, all or portions of this visitor may be deprecated.
+ *
+ * @param the return type of this visitor's methods
+ * @param the type of the additional parameter to this visitor's methods.
+ *
+ * @see SimpleAnnotationValueVisitor6
+ * @see SimpleAnnotationValueVisitor7
+ * @see SimpleAnnotationValueVisitor8
+ * @since 1.8
+ */
+@SupportedSourceVersion(RELEASE_8)
+public class LatestSimpleAnnotationValueVisitor extends SimpleAnnotationValueVisitor8 {
+ /**
+ * Constructor for concrete subclasses; uses {@code null} for the
+ * default value.
+ */
+ protected LatestSimpleAnnotationValueVisitor() {
+ super(null);
+ }
+
+ /**
+ * Constructor for concrete subclasses; uses the argument for the
+ * default value.
+ *
+ * @param defaultValue the value to assign to {@link #DEFAULT_VALUE}
+ */
+ protected LatestSimpleAnnotationValueVisitor(R defaultValue) {
+ super(defaultValue);
+ }
+}
--- /dev/null 2011-05-20 03:59:15.161965143 -0700
+++ new/src/share/classes/javax/lang/model/util/LatestSimpleElementVisitor.java 2011-06-02 20:34:56.000000000 -0700
@@ -0,0 +1,90 @@
+/*
+ * Copyright (c) 2011, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package javax.lang.model.util;
+
+import javax.lang.model.element.*;
+import javax.annotation.processing.SupportedSourceVersion;
+import static javax.lang.model.element.ElementKind.*;
+import javax.lang.model.SourceVersion;
+import static javax.lang.model.SourceVersion.*;
+
+/**
+ * A simple visitor of program elements with default behavior
+ * appropriate for the {@linkplain SourceVersion#latest latest}
+ * source version.
+ *
+ * Methods in this class may be overridden subject to their
+ * general contract. Note that annotating methods in concrete
+ * subclasses with {@link java.lang.Override @Override} will help
+ * ensure that methods are overridden as intended.
+ *
+ *
WARNING: The {@code ElementVisitor} interface
+ * implemented by this class may have methods added to it in the
+ * future to accommodate new, currently unknown, language structures
+ * added to future versions of the Java™ programming language.
+ * Therefore, methods whose names begin with {@code "visit"} may be
+ * added to this class in the future; to avoid incompatibilities,
+ * classes which extend this class should not declare any instance
+ * methods with names beginning with {@code "visit"}.
+ *
+ *
When such a new visit method is added, the default
+ * implementation in this class will be to call the {@link
+ * #visitUnknown visitUnknown} method. A new simple element visitor
+ * class will also be introduced to correspond to the new language
+ * level; this visitor will have different default behavior for the
+ * visit method in question. When the new visitor is introduced, all
+ * or portions of this visitor may be deprecated.
+ *
+ * @param the return type of this visitor's methods. Use {@code Void}
+ * for visitors that do not need to return results.
+ * @param the type of the additional parameter to this visitor's methods. Use {@code Void}
+ * for visitors that do not need an additional parameter.
+ *
+ * @see SimpleElementVisitor6
+ * @see SimpleElementVisitor7
+ * @see SimpleElementVisitor8
+ * @since 1.8
+ */
+@SupportedSourceVersion(RELEASE_8)
+public class LatestSimpleElementVisitor extends SimpleElementVisitor8 {
+ /**
+ * Constructor for concrete subclasses; uses {@code null} for the
+ * default value.
+ */
+ protected LatestSimpleElementVisitor(){
+ super(null);
+ }
+
+ /**
+ * Constructor for concrete subclasses; uses the argument for the
+ * default value.
+ *
+ * @param defaultValue the value to assign to {@link #DEFAULT_VALUE}
+ */
+ protected LatestSimpleElementVisitor(R defaultValue){
+ super(defaultValue);
+ }
+}
--- /dev/null 2011-05-20 03:59:15.161965143 -0700
+++ new/src/share/classes/javax/lang/model/util/LatestSimpleTypeVisitor.java 2011-06-02 20:34:56.000000000 -0700
@@ -0,0 +1,89 @@
+/*
+ * Copyright (c) 2011, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package javax.lang.model.util;
+
+import javax.lang.model.type.*;
+import javax.annotation.processing.SupportedSourceVersion;
+import javax.lang.model.SourceVersion;
+import static javax.lang.model.SourceVersion.*;
+
+/**
+ * A simple visitor of types with default behavior appropriate for the
+ * {@linkplain SourceVersion#latest latest} source version.
+ *
+ * Methods in this class may be overridden subject to their
+ * general contract. Note that annotating methods in concrete
+ * subclasses with {@link java.lang.Override @Override} will help
+ * ensure that methods are overridden as intended.
+ *
+ *
WARNING: The {@code TypeVisitor} interface implemented
+ * by this class may have methods added to it in the future to
+ * accommodate new, currently unknown, language structures added to
+ * future versions of the Java™ programming language.
+ * Therefore, methods whose names begin with {@code "visit"} may be
+ * added to this class in the future; to avoid incompatibilities,
+ * classes which extend this class should not declare any instance
+ * methods with names beginning with {@code "visit"}.
+ *
+ *
When such a new visit method is added, the default
+ * implementation in this class will be to call the {@link
+ * #visitUnknown visitUnknown} method. A new simple type visitor
+ * class will also be introduced to correspond to the new language
+ * level; this visitor will have different default behavior for the
+ * visit method in question. When the new visitor is introduced, all
+ * or portions of this visitor may be deprecated.
+ *
+ * @param the return type of this visitor's methods. Use {@link
+ * Void} for visitors that do not need to return results.
+ * @param the type of the additional parameter to this visitor's
+ * methods. Use {@code Void} for visitors that do not need an
+ * additional parameter.
+ *
+ * @see SimpleTypeVisitor6
+ * @see SimpleTypeVisitor7
+ * @see SimpleTypeVisitor8
+ * @since 1.8
+ */
+@SupportedSourceVersion(RELEASE_8)
+public class LatestSimpleTypeVisitor extends SimpleTypeVisitor8 {
+ /**
+ * Constructor for concrete subclasses; uses {@code null} for the
+ * default value.
+ */
+ protected LatestSimpleTypeVisitor(){
+ super(null);
+ }
+
+ /**
+ * Constructor for concrete subclasses; uses the argument for the
+ * default value.
+ *
+ * @param defaultValue the value to assign to {@link #DEFAULT_VALUE}
+ */
+ protected LatestSimpleTypeVisitor(R defaultValue){
+ super(defaultValue);
+ }
+}
--- /dev/null 2011-05-20 03:59:15.161965143 -0700
+++ new/src/share/classes/javax/lang/model/util/LatestTypeKindVisitor.java 2011-06-02 20:34:57.000000000 -0700
@@ -0,0 +1,97 @@
+/*
+ * Copyright (c) 2011, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package javax.lang.model.util;
+
+import javax.lang.model.type.*;
+import javax.annotation.processing.SupportedSourceVersion;
+import static javax.lang.model.element.ElementKind.*;
+import static javax.lang.model.SourceVersion.*;
+import javax.lang.model.SourceVersion;
+
+/**
+ * A visitor of types based on their {@linkplain TypeKind kind} with
+ * default behavior appropriate for the {@linkplain
+ * SourceVersion#latest latest} source version. For {@linkplain
+ * TypeMirror types} XYZ that may have more than one
+ * kind, the visitXYZ methods in this class delegate
+ * to the visitXYZKind method corresponding to the
+ * first argument's kind. The visitXYZKind methods
+ * call {@link #defaultAction defaultAction}, passing their arguments
+ * to {@code defaultAction}'s corresponding parameters.
+ *
+ * Methods in this class may be overridden subject to their
+ * general contract. Note that annotating methods in concrete
+ * subclasses with {@link java.lang.Override @Override} will help
+ * ensure that methods are overridden as intended.
+ *
+ *
WARNING: The {@code TypeVisitor} interface implemented
+ * by this class may have methods added to it in the future to
+ * accommodate new, currently unknown, language structures added to
+ * future versions of the Java™ programming language.
+ * Therefore, methods whose names begin with {@code "visit"} may be
+ * added to this class in the future; to avoid incompatibilities,
+ * classes which extend this class should not declare any instance
+ * methods with names beginning with {@code "visit"}.
+ *
+ *
When such a new visit method is added, the default
+ * implementation in this class will be to call the {@link
+ * #visitUnknown visitUnknown} method. A new type kind visitor class
+ * will also be introduced to correspond to the new language level;
+ * this visitor will have different default behavior for the visit
+ * method in question. When the new visitor is introduced, all or
+ * portions of this visitor may be deprecated.
+ *
+ * @param the return type of this visitor's methods. Use {@link
+ * Void} for visitors that do not need to return results.
+ * @param the type of the additional parameter to this visitor's
+ * methods. Use {@code Void} for visitors that do not need an
+ * additional parameter.
+ *
+ * @see TypeKindVisitor6
+ * @see TypeKindVisitor7
+ * @see TypeKindVisitor8
+ * @since 1.8
+ */
+@SupportedSourceVersion(RELEASE_8)
+public class LatestTypeKindVisitor extends TypeKindVisitor8 {
+ /**
+ * Constructor for concrete subclasses to call; uses {@code null}
+ * for the default value.
+ */
+ protected LatestTypeKindVisitor() {
+ super(null);
+ }
+
+ /**
+ * Constructor for concrete subclasses to call; uses the argument
+ * for the default value.
+ *
+ * @param defaultValue the value to assign to {@link #DEFAULT_VALUE}
+ */
+ protected LatestTypeKindVisitor(R defaultValue) {
+ super(defaultValue);
+ }
+}
--- /dev/null 2011-05-20 03:59:15.161965143 -0700
+++ new/src/share/classes/javax/lang/model/util/SimpleAnnotationValueVisitor8.java 2011-06-02 20:34:57.000000000 -0700
@@ -0,0 +1,91 @@
+/*
+ * Copyright (c) 2011, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package javax.lang.model.util;
+
+import java.util.List;
+import javax.lang.model.element.*;
+
+import javax.lang.model.type.TypeMirror;
+import static javax.lang.model.SourceVersion.*;
+import javax.lang.model.SourceVersion;
+import javax.annotation.processing.SupportedSourceVersion;
+
+/**
+ * A simple visitor for annotation values with default behavior
+ * appropriate for the {@link SourceVersion#RELEASE_8 RELEASE_8}
+ * source version. Visit methods call {@link #defaultAction
+ * defaultAction} passing their arguments to {@code defaultAction}'s
+ * corresponding parameters.
+ *
+ * Methods in this class may be overridden subject to their
+ * general contract. Note that annotating methods in concrete
+ * subclasses with {@link java.lang.Override @Override} will help
+ * ensure that methods are overridden as intended.
+ *
+ *
WARNING: The {@code AnnotationValueVisitor} interface
+ * implemented by this class may have methods added to it in the
+ * future to accommodate new, currently unknown, language structures
+ * added to future versions of the Java™ programming language.
+ * Therefore, methods whose names begin with {@code "visit"} may be
+ * added to this class in the future; to avoid incompatibilities,
+ * classes which extend this class should not declare any instance
+ * methods with names beginning with {@code "visit"}.
+ *
+ *
When such a new visit method is added, the default
+ * implementation in this class will be to call the {@link
+ * #visitUnknown visitUnknown} method. A new simple annotation
+ * value visitor class will also be introduced to correspond to the
+ * new language level; this visitor will have different default
+ * behavior for the visit method in question. When the new visitor is
+ * introduced, all or portions of this visitor may be deprecated.
+ *
+ * @param the return type of this visitor's methods
+ * @param the type of the additional parameter to this visitor's methods.
+ *
+ * @see SimpleAnnotationValueVisitor6
+ * @see SimpleAnnotationValueVisitor7
+ * @since 1.8
+ */
+@SupportedSourceVersion(RELEASE_8)
+public class SimpleAnnotationValueVisitor8 extends SimpleAnnotationValueVisitor7 {
+ /**
+ * Constructor for concrete subclasses; uses {@code null} for the
+ * default value.
+ */
+ protected SimpleAnnotationValueVisitor8() {
+ super(null);
+ }
+
+ /**
+ * Constructor for concrete subclasses; uses the argument for the
+ * default value.
+ *
+ * @param defaultValue the value to assign to {@link #DEFAULT_VALUE}
+ */
+ protected SimpleAnnotationValueVisitor8(R defaultValue) {
+ super(defaultValue);
+ }
+}
--- /dev/null 2011-05-20 03:59:15.161965143 -0700
+++ new/src/share/classes/javax/lang/model/util/SimpleElementVisitor8.java 2011-06-02 20:34:57.000000000 -0700
@@ -0,0 +1,94 @@
+/*
+ * Copyright (c) 2011, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package javax.lang.model.util;
+
+import javax.lang.model.element.*;
+import javax.annotation.processing.SupportedSourceVersion;
+import static javax.lang.model.element.ElementKind.*;
+import javax.lang.model.SourceVersion;
+import static javax.lang.model.SourceVersion.*;
+
+/**
+ * A simple visitor of program elements with default behavior
+ * appropriate for the {@link SourceVersion#RELEASE_8 RELEASE_8}
+ * source version.
+ *
+ * Visit methods corresponding to {@code RELEASE_7} and earlier
+ * language constructs call {@link #defaultAction defaultAction},
+ * passing their arguments to {@code defaultAction}'s corresponding
+ * parameters.
+ *
+ * Methods in this class may be overridden subject to their
+ * general contract. Note that annotating methods in concrete
+ * subclasses with {@link java.lang.Override @Override} will help
+ * ensure that methods are overridden as intended.
+ *
+ *
WARNING: The {@code ElementVisitor} interface
+ * implemented by this class may have methods added to it in the
+ * future to accommodate new, currently unknown, language structures
+ * added to future versions of the Java™ programming language.
+ * Therefore, methods whose names begin with {@code "visit"} may be
+ * added to this class in the future; to avoid incompatibilities,
+ * classes which extend this class should not declare any instance
+ * methods with names beginning with {@code "visit"}.
+ *
+ *
When such a new visit method is added, the default
+ * implementation in this class will be to call the {@link
+ * #visitUnknown visitUnknown} method. A new simple element visitor
+ * class will also be introduced to correspond to the new language
+ * level; this visitor will have different default behavior for the
+ * visit method in question. When the new visitor is introduced, all
+ * or portions of this visitor may be deprecated.
+ *
+ * @param the return type of this visitor's methods. Use {@code Void}
+ * for visitors that do not need to return results.
+ * @param the type of the additional parameter to this visitor's methods. Use {@code Void}
+ * for visitors that do not need an additional parameter.
+ *
+ * @see SimpleElementVisitor6
+ * @see SimpleElementVisitor7
+ * @since 1.8
+ */
+@SupportedSourceVersion(RELEASE_8)
+public class SimpleElementVisitor8 extends SimpleElementVisitor7 {
+ /**
+ * Constructor for concrete subclasses; uses {@code null} for the
+ * default value.
+ */
+ protected SimpleElementVisitor8(){
+ super(null);
+ }
+
+ /**
+ * Constructor for concrete subclasses; uses the argument for the
+ * default value.
+ *
+ * @param defaultValue the value to assign to {@link #DEFAULT_VALUE}
+ */
+ protected SimpleElementVisitor8(R defaultValue){
+ super(defaultValue);
+ }
+}
--- /dev/null 2011-05-20 03:59:15.161965143 -0700
+++ new/src/share/classes/javax/lang/model/util/SimpleTypeVisitor8.java 2011-06-02 20:34:58.000000000 -0700
@@ -0,0 +1,93 @@
+/*
+ * Copyright (c) 2011, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package javax.lang.model.util;
+
+import javax.lang.model.type.*;
+import javax.annotation.processing.SupportedSourceVersion;
+import javax.lang.model.SourceVersion;
+import static javax.lang.model.SourceVersion.*;
+
+/**
+ * A simple visitor of types with default behavior appropriate for the
+ * {@link SourceVersion#RELEASE_7 RELEASE_7} source version.
+ *
+ * Visit methods corresponding to {@code RELEASE_8} and earlier
+ * language constructs call {@link #defaultAction defaultAction},
+ * passing their arguments to {@code defaultAction}'s corresponding
+ * parameters.
+ *
+ * Methods in this class may be overridden subject to their
+ * general contract. Note that annotating methods in concrete
+ * subclasses with {@link java.lang.Override @Override} will help
+ * ensure that methods are overridden as intended.
+ *
+ *
WARNING: The {@code TypeVisitor} interface implemented
+ * by this class may have methods added to it in the future to
+ * accommodate new, currently unknown, language structures added to
+ * future versions of the Java™ programming language.
+ * Therefore, methods whose names begin with {@code "visit"} may be
+ * added to this class in the future; to avoid incompatibilities,
+ * classes which extend this class should not declare any instance
+ * methods with names beginning with {@code "visit"}.
+ *
+ *
When such a new visit method is added, the default
+ * implementation in this class will be to call the {@link
+ * #visitUnknown visitUnknown} method. A new simple type visitor
+ * class will also be introduced to correspond to the new language
+ * level; this visitor will have different default behavior for the
+ * visit method in question. When the new visitor is introduced, all
+ * or portions of this visitor may be deprecated.
+ *
+ * @param the return type of this visitor's methods. Use {@link
+ * Void} for visitors that do not need to return results.
+ * @param the type of the additional parameter to this visitor's
+ * methods. Use {@code Void} for visitors that do not need an
+ * additional parameter.
+ *
+ * @see SimpleTypeVisitor6
+ * @see SimpleTypeVisitor7
+ * @since 1.8
+ */
+@SupportedSourceVersion(RELEASE_8)
+public class SimpleTypeVisitor8 extends SimpleTypeVisitor7 {
+ /**
+ * Constructor for concrete subclasses; uses {@code null} for the
+ * default value.
+ */
+ protected SimpleTypeVisitor8(){
+ super(null);
+ }
+
+ /**
+ * Constructor for concrete subclasses; uses the argument for the
+ * default value.
+ *
+ * @param defaultValue the value to assign to {@link #DEFAULT_VALUE}
+ */
+ protected SimpleTypeVisitor8(R defaultValue){
+ super(defaultValue);
+ }
+}
--- /dev/null 2011-05-20 03:59:15.161965143 -0700
+++ new/src/share/classes/javax/lang/model/util/TypeKindVisitor8.java 2011-06-02 20:34:58.000000000 -0700
@@ -0,0 +1,96 @@
+/*
+ * Copyright (c) 2011, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package javax.lang.model.util;
+
+import javax.lang.model.type.*;
+import javax.annotation.processing.SupportedSourceVersion;
+import static javax.lang.model.element.ElementKind.*;
+import static javax.lang.model.SourceVersion.*;
+import javax.lang.model.SourceVersion;
+
+/**
+ * A visitor of types based on their {@linkplain TypeKind kind} with
+ * default behavior appropriate for the {@link SourceVersion#RELEASE_8
+ * RELEASE_8} source version. For {@linkplain
+ * TypeMirror types} XYZ that may have more than one
+ * kind, the visitXYZ methods in this class delegate
+ * to the visitXYZKind method corresponding to the
+ * first argument's kind. The visitXYZKind methods
+ * call {@link #defaultAction defaultAction}, passing their arguments
+ * to {@code defaultAction}'s corresponding parameters.
+ *
+ * Methods in this class may be overridden subject to their
+ * general contract. Note that annotating methods in concrete
+ * subclasses with {@link java.lang.Override @Override} will help
+ * ensure that methods are overridden as intended.
+ *
+ *
WARNING: The {@code TypeVisitor} interface implemented
+ * by this class may have methods added to it in the future to
+ * accommodate new, currently unknown, language structures added to
+ * future versions of the Java™ programming language.
+ * Therefore, methods whose names begin with {@code "visit"} may be
+ * added to this class in the future; to avoid incompatibilities,
+ * classes which extend this class should not declare any instance
+ * methods with names beginning with {@code "visit"}.
+ *
+ *
When such a new visit method is added, the default
+ * implementation in this class will be to call the {@link
+ * #visitUnknown visitUnknown} method. A new type kind visitor class
+ * will also be introduced to correspond to the new language level;
+ * this visitor will have different default behavior for the visit
+ * method in question. When the new visitor is introduced, all or
+ * portions of this visitor may be deprecated.
+ *
+ * @param the return type of this visitor's methods. Use {@link
+ * Void} for visitors that do not need to return results.
+ * @param the type of the additional parameter to this visitor's
+ * methods. Use {@code Void} for visitors that do not need an
+ * additional parameter.
+ *
+ * @see TypeKindVisitor6
+ * @see TypeKindVisitor7
+ * @since 1.8
+ */
+@SupportedSourceVersion(RELEASE_8)
+public class TypeKindVisitor8 extends TypeKindVisitor7 {
+ /**
+ * Constructor for concrete subclasses to call; uses {@code null}
+ * for the default value.
+ */
+ protected TypeKindVisitor8() {
+ super(null);
+ }
+
+ /**
+ * Constructor for concrete subclasses to call; uses the argument
+ * for the default value.
+ *
+ * @param defaultValue the value to assign to {@link #DEFAULT_VALUE}
+ */
+ protected TypeKindVisitor8(R defaultValue) {
+ super(defaultValue);
+ }
+}