7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8

Tue, 05 Jul 2011 16:37:24 -0700

author
darcy
date
Tue, 05 Jul 2011 16:37:24 -0700
changeset 1054
111bbf1ad913
parent 1053
0d8edba73d70
child 1055
7337295434b6

7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
Reviewed-by: jjg, mcimadamore

src/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java file | annotate | diff | comparison | revisions
src/share/classes/com/sun/tools/javac/processing/JavacRoundEnvironment.java file | annotate | diff | comparison | revisions
src/share/classes/com/sun/tools/javac/processing/PrintingProcessor.java file | annotate | diff | comparison | revisions
src/share/classes/com/sun/tools/javah/JavahTask.java file | annotate | diff | comparison | revisions
src/share/classes/com/sun/tools/javah/LLNI.java file | annotate | diff | comparison | revisions
src/share/classes/com/sun/tools/javah/TypeSignature.java file | annotate | diff | comparison | revisions
src/share/classes/javax/lang/model/util/AbstractAnnotationValueVisitor6.java file | annotate | diff | comparison | revisions
src/share/classes/javax/lang/model/util/AbstractAnnotationValueVisitor7.java file | annotate | diff | comparison | revisions
src/share/classes/javax/lang/model/util/AbstractAnnotationValueVisitor8.java file | annotate | diff | comparison | revisions
src/share/classes/javax/lang/model/util/AbstractElementVisitor6.java file | annotate | diff | comparison | revisions
src/share/classes/javax/lang/model/util/AbstractElementVisitor7.java file | annotate | diff | comparison | revisions
src/share/classes/javax/lang/model/util/AbstractElementVisitor8.java file | annotate | diff | comparison | revisions
src/share/classes/javax/lang/model/util/AbstractTypeVisitor6.java file | annotate | diff | comparison | revisions
src/share/classes/javax/lang/model/util/AbstractTypeVisitor7.java file | annotate | diff | comparison | revisions
src/share/classes/javax/lang/model/util/AbstractTypeVisitor8.java file | annotate | diff | comparison | revisions
src/share/classes/javax/lang/model/util/ElementKindVisitor6.java file | annotate | diff | comparison | revisions
src/share/classes/javax/lang/model/util/ElementKindVisitor7.java file | annotate | diff | comparison | revisions
src/share/classes/javax/lang/model/util/ElementKindVisitor8.java file | annotate | diff | comparison | revisions
src/share/classes/javax/lang/model/util/ElementScanner6.java file | annotate | diff | comparison | revisions
src/share/classes/javax/lang/model/util/ElementScanner7.java file | annotate | diff | comparison | revisions
src/share/classes/javax/lang/model/util/ElementScanner8.java file | annotate | diff | comparison | revisions
src/share/classes/javax/lang/model/util/SimpleAnnotationValueVisitor6.java file | annotate | diff | comparison | revisions
src/share/classes/javax/lang/model/util/SimpleAnnotationValueVisitor7.java file | annotate | diff | comparison | revisions
src/share/classes/javax/lang/model/util/SimpleAnnotationValueVisitor8.java file | annotate | diff | comparison | revisions
src/share/classes/javax/lang/model/util/SimpleElementVisitor6.java file | annotate | diff | comparison | revisions
src/share/classes/javax/lang/model/util/SimpleElementVisitor7.java file | annotate | diff | comparison | revisions
src/share/classes/javax/lang/model/util/SimpleElementVisitor8.java file | annotate | diff | comparison | revisions
src/share/classes/javax/lang/model/util/SimpleTypeVisitor6.java file | annotate | diff | comparison | revisions
src/share/classes/javax/lang/model/util/SimpleTypeVisitor7.java file | annotate | diff | comparison | revisions
src/share/classes/javax/lang/model/util/SimpleTypeVisitor8.java file | annotate | diff | comparison | revisions
src/share/classes/javax/lang/model/util/TypeKindVisitor6.java file | annotate | diff | comparison | revisions
src/share/classes/javax/lang/model/util/TypeKindVisitor7.java file | annotate | diff | comparison | revisions
src/share/classes/javax/lang/model/util/TypeKindVisitor8.java file | annotate | diff | comparison | revisions
src/share/sample/javac/processing/src/CheckNamesProcessor.java file | annotate | diff | comparison | revisions
test/tools/javac/6402516/CheckLocalElements.java file | annotate | diff | comparison | revisions
test/tools/javac/api/TestOperators.java file | annotate | diff | comparison | revisions
test/tools/javac/enum/6350057/T6350057.java file | annotate | diff | comparison | revisions
test/tools/javac/enum/6424358/T6424358.java file | annotate | diff | comparison | revisions
test/tools/javac/failover/FailOver15.out file | annotate | diff | comparison | revisions
test/tools/javac/lib/JavacTestingAbstractProcessor.java file | annotate | diff | comparison | revisions
test/tools/javac/multicatch/model/ModelChecker.java file | annotate | diff | comparison | revisions
test/tools/javac/processing/model/6194785/T6194785.java file | annotate | diff | comparison | revisions
test/tools/javac/processing/model/TestSymtabItems.java file | annotate | diff | comparison | revisions
test/tools/javac/processing/model/element/TestMissingElement/TestMissingElement.java file | annotate | diff | comparison | revisions
test/tools/javac/processing/model/element/TestResourceVariable.java file | annotate | diff | comparison | revisions
test/tools/javac/processing/model/type/NoTypes.java file | annotate | diff | comparison | revisions
test/tools/javac/processing/model/type/TestUnionType.java file | annotate | diff | comparison | revisions
test/tools/javac/processing/model/util/deprecation/TestDeprecation.java file | annotate | diff | comparison | revisions
     1.1 --- a/src/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java	Fri Jul 01 14:28:19 2011 -0700
     1.2 +++ b/src/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java	Tue Jul 05 16:37:24 2011 -0700
     1.3 @@ -720,7 +720,7 @@
     1.4       * Leave class public for external testing purposes.
     1.5       */
     1.6      public static class ComputeAnnotationSet extends
     1.7 -        ElementScanner7<Set<TypeElement>, Set<TypeElement>> {
     1.8 +        ElementScanner8<Set<TypeElement>, Set<TypeElement>> {
     1.9          final Elements elements;
    1.10  
    1.11          public ComputeAnnotationSet(Elements elements) {
     2.1 --- a/src/share/classes/com/sun/tools/javac/processing/JavacRoundEnvironment.java	Fri Jul 01 14:28:19 2011 -0700
     2.2 +++ b/src/share/classes/com/sun/tools/javac/processing/JavacRoundEnvironment.java	Tue Jul 05 16:37:24 2011 -0700
     2.3 @@ -1,5 +1,5 @@
     2.4  /*
     2.5 - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
     2.6 + * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
     2.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     2.8   *
     2.9   * This code is free software; you can redistribute it and/or modify it
    2.10 @@ -125,7 +125,7 @@
    2.11          else
    2.12              throw new AssertionError("Bad implementation type for " + tm);
    2.13  
    2.14 -        ElementScanner7<Set<Element>, DeclaredType> scanner =
    2.15 +        ElementScanner8<Set<Element>, DeclaredType> scanner =
    2.16              new AnnotationSetScanner(result, typeUtil);
    2.17  
    2.18          for (Element element : rootElements)
    2.19 @@ -136,7 +136,7 @@
    2.20  
    2.21      // Could be written as a local class inside getElementsAnnotatedWith
    2.22      private class AnnotationSetScanner extends
    2.23 -        ElementScanner7<Set<Element>, DeclaredType> {
    2.24 +        ElementScanner8<Set<Element>, DeclaredType> {
    2.25          // Insertion-order preserving set
    2.26          Set<Element> annotatedElements = new LinkedHashSet<Element>();
    2.27          Types typeUtil;
     3.1 --- a/src/share/classes/com/sun/tools/javac/processing/PrintingProcessor.java	Fri Jul 01 14:28:19 2011 -0700
     3.2 +++ b/src/share/classes/com/sun/tools/javac/processing/PrintingProcessor.java	Tue Jul 05 16:37:24 2011 -0700
     3.3 @@ -82,7 +82,7 @@
     3.4       * Used for the -Xprint option and called by Elements.printElements
     3.5       */
     3.6      public static class PrintingElementVisitor
     3.7 -        extends SimpleElementVisitor7<PrintingElementVisitor, Boolean> {
     3.8 +        extends SimpleElementVisitor8<PrintingElementVisitor, Boolean> {
     3.9          int indentation; // Indentation level;
    3.10          final PrintWriter writer;
    3.11          final Elements elementUtils;
     4.1 --- a/src/share/classes/com/sun/tools/javah/JavahTask.java	Fri Jul 01 14:28:19 2011 -0700
     4.2 +++ b/src/share/classes/com/sun/tools/javah/JavahTask.java	Tue Jul 05 16:37:24 2011 -0700
     4.3 @@ -1,5 +1,5 @@
     4.4  /*
     4.5 - * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
     4.6 + * Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved.
     4.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4.8   *
     4.9   * This code is free software; you can redistribute it and/or modify it
    4.10 @@ -60,7 +60,7 @@
    4.11  import javax.lang.model.type.TypeMirror;
    4.12  import javax.lang.model.type.TypeVisitor;
    4.13  import javax.lang.model.util.ElementFilter;
    4.14 -import javax.lang.model.util.SimpleTypeVisitor7;
    4.15 +import javax.lang.model.util.SimpleTypeVisitor8;
    4.16  import javax.lang.model.util.Types;
    4.17  
    4.18  import javax.tools.Diagnostic;
    4.19 @@ -753,7 +753,7 @@
    4.20          }
    4.21  
    4.22          private TypeVisitor<Void,Types> checkMethodParametersVisitor =
    4.23 -                new SimpleTypeVisitor7<Void,Types>() {
    4.24 +                new SimpleTypeVisitor8<Void,Types>() {
    4.25              @Override
    4.26              public Void visitArray(ArrayType t, Types types) {
    4.27                  visit(t.getComponentType(), types);
     5.1 --- a/src/share/classes/com/sun/tools/javah/LLNI.java	Fri Jul 01 14:28:19 2011 -0700
     5.2 +++ b/src/share/classes/com/sun/tools/javah/LLNI.java	Tue Jul 05 16:37:24 2011 -0700
     5.3 @@ -1,5 +1,5 @@
     5.4  /*
     5.5 - * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
     5.6 + * Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved.
     5.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     5.8   *
     5.9   * This code is free software; you can redistribute it and/or modify it
    5.10 @@ -45,7 +45,7 @@
    5.11  import javax.lang.model.type.TypeMirror;
    5.12  import javax.lang.model.type.TypeVisitor;
    5.13  import javax.lang.model.util.ElementFilter;
    5.14 -import javax.lang.model.util.SimpleTypeVisitor7;
    5.15 +import javax.lang.model.util.SimpleTypeVisitor8;
    5.16  
    5.17  /*
    5.18   * <p><b>This is NOT part of any supported API.
    5.19 @@ -628,7 +628,7 @@
    5.20      }
    5.21  
    5.22      protected final boolean isLongOrDouble(TypeMirror t) {
    5.23 -        TypeVisitor<Boolean,Void> v = new SimpleTypeVisitor7<Boolean,Void>() {
    5.24 +        TypeVisitor<Boolean,Void> v = new SimpleTypeVisitor8<Boolean,Void>() {
    5.25              public Boolean defaultAction(TypeMirror t, Void p){
    5.26                  return false;
    5.27              }
     6.1 --- a/src/share/classes/com/sun/tools/javah/TypeSignature.java	Fri Jul 01 14:28:19 2011 -0700
     6.2 +++ b/src/share/classes/com/sun/tools/javah/TypeSignature.java	Tue Jul 05 16:37:24 2011 -0700
     6.3 @@ -1,5 +1,5 @@
     6.4  /*
     6.5 - * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
     6.6 + * Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved.
     6.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     6.8   *
     6.9   * This code is free software; you can redistribute it and/or modify it
    6.10 @@ -38,7 +38,7 @@
    6.11  import javax.lang.model.type.TypeVariable;
    6.12  import javax.lang.model.type.TypeVisitor;
    6.13  import javax.lang.model.util.Elements;
    6.14 -import javax.lang.model.util.SimpleTypeVisitor7;
    6.15 +import javax.lang.model.util.SimpleTypeVisitor8;
    6.16  
    6.17  /**
    6.18   * Returns internal type signature.
    6.19 @@ -245,7 +245,7 @@
    6.20  
    6.21  
    6.22      String qualifiedTypeName(TypeMirror type) {
    6.23 -        TypeVisitor<Name, Void> v = new SimpleTypeVisitor7<Name, Void>() {
    6.24 +        TypeVisitor<Name, Void> v = new SimpleTypeVisitor8<Name, Void>() {
    6.25              @Override
    6.26              public Name visitArray(ArrayType t, Void p) {
    6.27                  return t.getComponentType().accept(this, p);
     7.1 --- a/src/share/classes/javax/lang/model/util/AbstractAnnotationValueVisitor6.java	Fri Jul 01 14:28:19 2011 -0700
     7.2 +++ b/src/share/classes/javax/lang/model/util/AbstractAnnotationValueVisitor6.java	Tue Jul 05 16:37:24 2011 -0700
     7.3 @@ -1,5 +1,5 @@
     7.4  /*
     7.5 - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
     7.6 + * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
     7.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     7.8   *
     7.9   * This code is free software; you can redistribute it and/or modify it
    7.10 @@ -64,6 +64,7 @@
    7.11   * @author Peter von der Ah&eacute;
    7.12   *
    7.13   * @see AbstractAnnotationValueVisitor7
    7.14 + * @see AbstractAnnotationValueVisitor8
    7.15   * @since 1.6
    7.16   */
    7.17  @SupportedSourceVersion(RELEASE_6)
     8.1 --- a/src/share/classes/javax/lang/model/util/AbstractAnnotationValueVisitor7.java	Fri Jul 01 14:28:19 2011 -0700
     8.2 +++ b/src/share/classes/javax/lang/model/util/AbstractAnnotationValueVisitor7.java	Tue Jul 05 16:37:24 2011 -0700
     8.3 @@ -1,5 +1,5 @@
     8.4  /*
     8.5 - * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
     8.6 + * Copyright (c) 2010, 2011 Oracle and/or its affiliates. All rights reserved.
     8.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     8.8   *
     8.9   * This code is free software; you can redistribute it and/or modify it
    8.10 @@ -59,6 +59,7 @@
    8.11   * @param <P> the type of the additional parameter to this visitor's methods.
    8.12   *
    8.13   * @see AbstractAnnotationValueVisitor6
    8.14 + * @see AbstractAnnotationValueVisitor8
    8.15   * @since 1.7
    8.16   */
    8.17  @SupportedSourceVersion(RELEASE_7)
     9.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     9.2 +++ b/src/share/classes/javax/lang/model/util/AbstractAnnotationValueVisitor8.java	Tue Jul 05 16:37:24 2011 -0700
     9.3 @@ -0,0 +1,74 @@
     9.4 +/*
     9.5 + * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
     9.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     9.7 + *
     9.8 + * This code is free software; you can redistribute it and/or modify it
     9.9 + * under the terms of the GNU General Public License version 2 only, as
    9.10 + * published by the Free Software Foundation.  Oracle designates this
    9.11 + * particular file as subject to the "Classpath" exception as provided
    9.12 + * by Oracle in the LICENSE file that accompanied this code.
    9.13 + *
    9.14 + * This code is distributed in the hope that it will be useful, but WITHOUT
    9.15 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    9.16 + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    9.17 + * version 2 for more details (a copy is included in the LICENSE file that
    9.18 + * accompanied this code).
    9.19 + *
    9.20 + * You should have received a copy of the GNU General Public License version
    9.21 + * 2 along with this work; if not, write to the Free Software Foundation,
    9.22 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    9.23 + *
    9.24 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
    9.25 + * or visit www.oracle.com if you need additional information or have any
    9.26 + * questions.
    9.27 + */
    9.28 +
    9.29 +package javax.lang.model.util;
    9.30 +
    9.31 +import java.util.List;
    9.32 +import javax.lang.model.element.*;
    9.33 +
    9.34 +import javax.lang.model.type.TypeMirror;
    9.35 +import static javax.lang.model.SourceVersion.*;
    9.36 +import javax.lang.model.SourceVersion;
    9.37 +import javax.annotation.processing.SupportedSourceVersion;
    9.38 +
    9.39 +/**
    9.40 + * A skeletal visitor for annotation values with default behavior
    9.41 + * appropriate for the {@link SourceVersion#RELEASE_8 RELEASE_8}
    9.42 + * source version.
    9.43 + *
    9.44 + * <p> <b>WARNING:</b> The {@code AnnotationValueVisitor} interface
    9.45 + * implemented by this class may have methods added to it in the
    9.46 + * future to accommodate new, currently unknown, language structures
    9.47 + * added to future versions of the Java&trade; programming language.
    9.48 + * Therefore, methods whose names begin with {@code "visit"} may be
    9.49 + * added to this class in the future; to avoid incompatibilities,
    9.50 + * classes which extend this class should not declare any instance
    9.51 + * methods with names beginning with {@code "visit"}.
    9.52 + *
    9.53 + * <p>When such a new visit method is added, the default
    9.54 + * implementation in this class will be to call the {@link
    9.55 + * #visitUnknown visitUnknown} method.  A new abstract annotation
    9.56 + * value visitor class will also be introduced to correspond to the
    9.57 + * new language level; this visitor will have different default
    9.58 + * behavior for the visit method in question.  When the new visitor is
    9.59 + * introduced, all or portions of this visitor may be deprecated.
    9.60 + *
    9.61 + * @param <R> the return type of this visitor's methods
    9.62 + * @param <P> the type of the additional parameter to this visitor's methods.
    9.63 + *
    9.64 + * @see AbstractAnnotationValueVisitor6
    9.65 + * @see AbstractAnnotationValueVisitor7
    9.66 + * @since 1.8
    9.67 + */
    9.68 +@SupportedSourceVersion(RELEASE_8)
    9.69 +public abstract class AbstractAnnotationValueVisitor8<R, P> extends AbstractAnnotationValueVisitor7<R, P> {
    9.70 +
    9.71 +    /**
    9.72 +     * Constructor for concrete subclasses to call.
    9.73 +     */
    9.74 +    protected AbstractAnnotationValueVisitor8() {
    9.75 +        super();
    9.76 +    }
    9.77 +}
    10.1 --- a/src/share/classes/javax/lang/model/util/AbstractElementVisitor6.java	Fri Jul 01 14:28:19 2011 -0700
    10.2 +++ b/src/share/classes/javax/lang/model/util/AbstractElementVisitor6.java	Tue Jul 05 16:37:24 2011 -0700
    10.3 @@ -1,5 +1,5 @@
    10.4  /*
    10.5 - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
    10.6 + * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
    10.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    10.8   *
    10.9   * This code is free software; you can redistribute it and/or modify it
   10.10 @@ -67,6 +67,7 @@
   10.11   * @author Peter von der Ah&eacute;
   10.12   *
   10.13   * @see AbstractElementVisitor7
   10.14 + * @see AbstractElementVisitor8
   10.15   * @since 1.6
   10.16   */
   10.17  @SupportedSourceVersion(RELEASE_6)
    11.1 --- a/src/share/classes/javax/lang/model/util/AbstractElementVisitor7.java	Fri Jul 01 14:28:19 2011 -0700
    11.2 +++ b/src/share/classes/javax/lang/model/util/AbstractElementVisitor7.java	Tue Jul 05 16:37:24 2011 -0700
    11.3 @@ -1,5 +1,5 @@
    11.4  /*
    11.5 - * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
    11.6 + * Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
    11.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    11.8   *
    11.9   * This code is free software; you can redistribute it and/or modify it
   11.10 @@ -62,6 +62,7 @@
   11.11   *            additional parameter.
   11.12   *
   11.13   * @see AbstractElementVisitor6
   11.14 + * @see AbstractElementVisitor8
   11.15   * @since 1.7
   11.16   */
   11.17  @SupportedSourceVersion(RELEASE_7)
    12.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    12.2 +++ b/src/share/classes/javax/lang/model/util/AbstractElementVisitor8.java	Tue Jul 05 16:37:24 2011 -0700
    12.3 @@ -0,0 +1,76 @@
    12.4 +/*
    12.5 + * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
    12.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    12.7 + *
    12.8 + * This code is free software; you can redistribute it and/or modify it
    12.9 + * under the terms of the GNU General Public License version 2 only, as
   12.10 + * published by the Free Software Foundation.  Oracle designates this
   12.11 + * particular file as subject to the "Classpath" exception as provided
   12.12 + * by Oracle in the LICENSE file that accompanied this code.
   12.13 + *
   12.14 + * This code is distributed in the hope that it will be useful, but WITHOUT
   12.15 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   12.16 + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
   12.17 + * version 2 for more details (a copy is included in the LICENSE file that
   12.18 + * accompanied this code).
   12.19 + *
   12.20 + * You should have received a copy of the GNU General Public License version
   12.21 + * 2 along with this work; if not, write to the Free Software Foundation,
   12.22 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
   12.23 + *
   12.24 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
   12.25 + * or visit www.oracle.com if you need additional information or have any
   12.26 + * questions.
   12.27 + */
   12.28 +
   12.29 +package javax.lang.model.util;
   12.30 +
   12.31 +import javax.lang.model.element.*;
   12.32 +import javax.annotation.processing.SupportedSourceVersion;
   12.33 +import javax.lang.model.element.*;
   12.34 +import static javax.lang.model.element.ElementKind.*;
   12.35 +import static javax.lang.model.SourceVersion.*;
   12.36 +import javax.lang.model.SourceVersion;
   12.37 +
   12.38 +
   12.39 +/**
   12.40 + * A skeletal visitor of program elements with default behavior
   12.41 + * appropriate for the {@link SourceVersion#RELEASE_8 RELEASE_8}
   12.42 + * source version.
   12.43 + *
   12.44 + * <p> <b>WARNING:</b> The {@code ElementVisitor} interface
   12.45 + * implemented by this class may have methods added to it in the
   12.46 + * future to accommodate new, currently unknown, language structures
   12.47 + * added to future versions of the Java&trade; programming language.
   12.48 + * Therefore, methods whose names begin with {@code "visit"} may be
   12.49 + * added to this class in the future; to avoid incompatibilities,
   12.50 + * classes which extend this class should not declare any instance
   12.51 + * methods with names beginning with {@code "visit"}.
   12.52 + *
   12.53 + * <p>When such a new visit method is added, the default
   12.54 + * implementation in this class will be to call the {@link
   12.55 + * #visitUnknown visitUnknown} method.  A new abstract element visitor
   12.56 + * class will also be introduced to correspond to the new language
   12.57 + * level; this visitor will have different default behavior for the
   12.58 + * visit method in question.  When the new visitor is introduced, all
   12.59 + * or portions of this visitor may be deprecated.
   12.60 + *
   12.61 + * @param <R> the return type of this visitor's methods.  Use {@link
   12.62 + *            Void} for visitors that do not need to return results.
   12.63 + * @param <P> the type of the additional parameter to this visitor's
   12.64 + *            methods.  Use {@code Void} for visitors that do not need an
   12.65 + *            additional parameter.
   12.66 + *
   12.67 + * @see AbstractElementVisitor6
   12.68 + * @see AbstractElementVisitor7
   12.69 + * @since 1.8
   12.70 + */
   12.71 +@SupportedSourceVersion(RELEASE_8)
   12.72 +public abstract class AbstractElementVisitor8<R, P> extends AbstractElementVisitor7<R, P> {
   12.73 +    /**
   12.74 +     * Constructor for concrete subclasses to call.
   12.75 +     */
   12.76 +    protected AbstractElementVisitor8(){
   12.77 +        super();
   12.78 +    }
   12.79 +}
    13.1 --- a/src/share/classes/javax/lang/model/util/AbstractTypeVisitor6.java	Fri Jul 01 14:28:19 2011 -0700
    13.2 +++ b/src/share/classes/javax/lang/model/util/AbstractTypeVisitor6.java	Tue Jul 05 16:37:24 2011 -0700
    13.3 @@ -60,6 +60,7 @@
    13.4   * @author Peter von der Ah&eacute;
    13.5   *
    13.6   * @see AbstractTypeVisitor7
    13.7 + * @see AbstractTypeVisitor8
    13.8   * @since 1.6
    13.9   */
   13.10  public abstract class AbstractTypeVisitor6<R, P> implements TypeVisitor<R, P> {
    14.1 --- a/src/share/classes/javax/lang/model/util/AbstractTypeVisitor7.java	Fri Jul 01 14:28:19 2011 -0700
    14.2 +++ b/src/share/classes/javax/lang/model/util/AbstractTypeVisitor7.java	Tue Jul 05 16:37:24 2011 -0700
    14.3 @@ -56,6 +56,7 @@
    14.4   *            additional parameter.
    14.5   *
    14.6   * @see AbstractTypeVisitor6
    14.7 + * @see AbstractTypeVisitor8
    14.8   * @since 1.7
    14.9   */
   14.10  public abstract class AbstractTypeVisitor7<R, P> extends AbstractTypeVisitor6<R, P> {
    15.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    15.2 +++ b/src/share/classes/javax/lang/model/util/AbstractTypeVisitor8.java	Tue Jul 05 16:37:24 2011 -0700
    15.3 @@ -0,0 +1,69 @@
    15.4 +/*
    15.5 + * Copyright (c) 2011 Oracle and/or its affiliates. All rights reserved.
    15.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    15.7 + *
    15.8 + * This code is free software; you can redistribute it and/or modify it
    15.9 + * under the terms of the GNU General Public License version 2 only, as
   15.10 + * published by the Free Software Foundation.  Oracle designates this
   15.11 + * particular file as subject to the "Classpath" exception as provided
   15.12 + * by Oracle in the LICENSE file that accompanied this code.
   15.13 + *
   15.14 + * This code is distributed in the hope that it will be useful, but WITHOUT
   15.15 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   15.16 + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
   15.17 + * version 2 for more details (a copy is included in the LICENSE file that
   15.18 + * accompanied this code).
   15.19 + *
   15.20 + * You should have received a copy of the GNU General Public License version
   15.21 + * 2 along with this work; if not, write to the Free Software Foundation,
   15.22 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
   15.23 + *
   15.24 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
   15.25 + * or visit www.oracle.com if you need additional information or have any
   15.26 + * questions.
   15.27 + */
   15.28 +
   15.29 +package javax.lang.model.util;
   15.30 +
   15.31 +import javax.lang.model.type.*;
   15.32 +
   15.33 +/**
   15.34 + * A skeletal visitor of types with default behavior appropriate for
   15.35 + * the {@link javax.lang.model.SourceVersion#RELEASE_8 RELEASE_8}
   15.36 + * source version.
   15.37 + *
   15.38 + * <p> <b>WARNING:</b> The {@code TypeVisitor} interface implemented
   15.39 + * by this class may have methods added to it in the future to
   15.40 + * accommodate new, currently unknown, language structures added to
   15.41 + * future versions of the Java&trade; programming language.
   15.42 + * Therefore, methods whose names begin with {@code "visit"} may be
   15.43 + * added to this class in the future; to avoid incompatibilities,
   15.44 + * classes which extend this class should not declare any instance
   15.45 + * methods with names beginning with {@code "visit"}.
   15.46 + *
   15.47 + * <p>When such a new visit method is added, the default
   15.48 + * implementation in this class will be to call the {@link
   15.49 + * #visitUnknown visitUnknown} method.  A new abstract type visitor
   15.50 + * class will also be introduced to correspond to the new language
   15.51 + * level; this visitor will have different default behavior for the
   15.52 + * visit method in question.  When the new visitor is introduced, all
   15.53 + * or portions of this visitor may be deprecated.
   15.54 + *
   15.55 + * @param <R> the return type of this visitor's methods.  Use {@link
   15.56 + *            Void} for visitors that do not need to return results.
   15.57 + * @param <P> the type of the additional parameter to this visitor's
   15.58 + *            methods.  Use {@code Void} for visitors that do not need an
   15.59 + *            additional parameter.
   15.60 + *
   15.61 + * @see AbstractTypeVisitor6
   15.62 + * @see AbstractTypeVisitor7
   15.63 + * @since 1.8
   15.64 + */
   15.65 +public abstract class AbstractTypeVisitor8<R, P> extends AbstractTypeVisitor7<R, P> {
   15.66 +    /**
   15.67 +     * Constructor for concrete subclasses to call.
   15.68 +     */
   15.69 +    protected AbstractTypeVisitor8() {
   15.70 +        super();
   15.71 +    }
   15.72 +}
    16.1 --- a/src/share/classes/javax/lang/model/util/ElementKindVisitor6.java	Fri Jul 01 14:28:19 2011 -0700
    16.2 +++ b/src/share/classes/javax/lang/model/util/ElementKindVisitor6.java	Tue Jul 05 16:37:24 2011 -0700
    16.3 @@ -78,6 +78,7 @@
    16.4   * @author Peter von der Ah&eacute;
    16.5   *
    16.6   * @see ElementKindVisitor7
    16.7 + * @see ElementKindVisitor8
    16.8   * @since 1.6
    16.9   */
   16.10  @SupportedSourceVersion(RELEASE_6)
    17.1 --- a/src/share/classes/javax/lang/model/util/ElementKindVisitor7.java	Fri Jul 01 14:28:19 2011 -0700
    17.2 +++ b/src/share/classes/javax/lang/model/util/ElementKindVisitor7.java	Tue Jul 05 16:37:24 2011 -0700
    17.3 @@ -73,6 +73,7 @@
    17.4   *            additional parameter.
    17.5   *
    17.6   * @see ElementKindVisitor6
    17.7 + * @see ElementKindVisitor8
    17.8   * @since 1.7
    17.9   */
   17.10  @SupportedSourceVersion(RELEASE_7)
    18.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    18.2 +++ b/src/share/classes/javax/lang/model/util/ElementKindVisitor8.java	Tue Jul 05 16:37:24 2011 -0700
    18.3 @@ -0,0 +1,98 @@
    18.4 +/*
    18.5 + * Copyright (c) 2011 Oracle and/or its affiliates. All rights reserved.
    18.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    18.7 + *
    18.8 + * This code is free software; you can redistribute it and/or modify it
    18.9 + * under the terms of the GNU General Public License version 2 only, as
   18.10 + * published by the Free Software Foundation.  Oracle designates this
   18.11 + * particular file as subject to the "Classpath" exception as provided
   18.12 + * by Oracle in the LICENSE file that accompanied this code.
   18.13 + *
   18.14 + * This code is distributed in the hope that it will be useful, but WITHOUT
   18.15 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   18.16 + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
   18.17 + * version 2 for more details (a copy is included in the LICENSE file that
   18.18 + * accompanied this code).
   18.19 + *
   18.20 + * You should have received a copy of the GNU General Public License version
   18.21 + * 2 along with this work; if not, write to the Free Software Foundation,
   18.22 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
   18.23 + *
   18.24 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
   18.25 + * or visit www.oracle.com if you need additional information or have any
   18.26 + * questions.
   18.27 + */
   18.28 +
   18.29 +package javax.lang.model.util;
   18.30 +
   18.31 +import javax.lang.model.element.*;
   18.32 +import static javax.lang.model.element.ElementKind.*;
   18.33 +import javax.annotation.processing.SupportedSourceVersion;
   18.34 +import static javax.lang.model.SourceVersion.*;
   18.35 +import javax.lang.model.SourceVersion;
   18.36 +
   18.37 +/**
   18.38 + * A visitor of program elements based on their {@linkplain
   18.39 + * ElementKind kind} with default behavior appropriate for the {@link
   18.40 + * SourceVersion#RELEASE_8 RELEASE_8} source version.  For {@linkplain
   18.41 + * Element elements} <tt><i>XYZ</i></tt> that may have more than one
   18.42 + * kind, the <tt>visit<i>XYZ</i></tt> methods in this class delegate
   18.43 + * to the <tt>visit<i>XYZKind</i></tt> method corresponding to the
   18.44 + * first argument's kind.  The <tt>visit<i>XYZKind</i></tt> methods
   18.45 + * call {@link #defaultAction defaultAction}, passing their arguments
   18.46 + * to {@code defaultAction}'s corresponding parameters.
   18.47 + *
   18.48 + * <p> Methods in this class may be overridden subject to their
   18.49 + * general contract.  Note that annotating methods in concrete
   18.50 + * subclasses with {@link java.lang.Override @Override} will help
   18.51 + * ensure that methods are overridden as intended.
   18.52 + *
   18.53 + * <p> <b>WARNING:</b> The {@code ElementVisitor} interface
   18.54 + * implemented by this class may have methods added to it or the
   18.55 + * {@code ElementKind} {@code enum} used in this case may have
   18.56 + * constants added to it in the future to accommodate new, currently
   18.57 + * unknown, language structures added to future versions of the
   18.58 + * Java&trade; programming language.  Therefore, methods whose names
   18.59 + * begin with {@code "visit"} may be added to this class in the
   18.60 + * future; to avoid incompatibilities, classes which extend this class
   18.61 + * should not declare any instance methods with names beginning with
   18.62 + * {@code "visit"}.
   18.63 + *
   18.64 + * <p>When such a new visit method is added, the default
   18.65 + * implementation in this class will be to call the {@link
   18.66 + * #visitUnknown visitUnknown} method.  A new abstract element kind
   18.67 + * visitor class will also be introduced to correspond to the new
   18.68 + * language level; this visitor will have different default behavior
   18.69 + * for the visit method in question.  When the new visitor is
   18.70 + * introduced, all or portions of this visitor may be deprecated.
   18.71 + *
   18.72 + * @param <R> the return type of this visitor's methods.  Use {@link
   18.73 + *            Void} for visitors that do not need to return results.
   18.74 + * @param <P> the type of the additional parameter to this visitor's
   18.75 + *            methods.  Use {@code Void} for visitors that do not need an
   18.76 + *            additional parameter.
   18.77 + *
   18.78 + * @see ElementKindVisitor6
   18.79 + * @see ElementKindVisitor7
   18.80 + * @since 1.8
   18.81 + */
   18.82 +@SupportedSourceVersion(RELEASE_8)
   18.83 +public class ElementKindVisitor8<R, P> extends ElementKindVisitor7<R, P> {
   18.84 +    /**
   18.85 +     * Constructor for concrete subclasses; uses {@code null} for the
   18.86 +     * default value.
   18.87 +     */
   18.88 +    protected ElementKindVisitor8() {
   18.89 +        super(null);
   18.90 +    }
   18.91 +
   18.92 +    /**
   18.93 +     * Constructor for concrete subclasses; uses the argument for the
   18.94 +     * default value.
   18.95 +     *
   18.96 +     * @param defaultValue the value to assign to {@link #DEFAULT_VALUE}
   18.97 +     */
   18.98 +    protected ElementKindVisitor8(R defaultValue) {
   18.99 +        super(defaultValue);
  18.100 +    }
  18.101 +}
    19.1 --- a/src/share/classes/javax/lang/model/util/ElementScanner6.java	Fri Jul 01 14:28:19 2011 -0700
    19.2 +++ b/src/share/classes/javax/lang/model/util/ElementScanner6.java	Tue Jul 05 16:37:24 2011 -0700
    19.3 @@ -90,6 +90,7 @@
    19.4   * @author Peter von der Ah&eacute;
    19.5   *
    19.6   * @see ElementScanner7
    19.7 + * @see ElementScanner8
    19.8   * @since 1.6
    19.9   */
   19.10  @SupportedSourceVersion(RELEASE_6)
    20.1 --- a/src/share/classes/javax/lang/model/util/ElementScanner7.java	Fri Jul 01 14:28:19 2011 -0700
    20.2 +++ b/src/share/classes/javax/lang/model/util/ElementScanner7.java	Tue Jul 05 16:37:24 2011 -0700
    20.3 @@ -86,6 +86,7 @@
    20.4   *            additional parameter.
    20.5   *
    20.6   * @see ElementScanner6
    20.7 + * @see ElementScanner8
    20.8   * @since 1.7
    20.9   */
   20.10  @SupportedSourceVersion(RELEASE_7)
    21.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    21.2 +++ b/src/share/classes/javax/lang/model/util/ElementScanner8.java	Tue Jul 05 16:37:24 2011 -0700
    21.3 @@ -0,0 +1,109 @@
    21.4 +/*
    21.5 + * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
    21.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    21.7 + *
    21.8 + * This code is free software; you can redistribute it and/or modify it
    21.9 + * under the terms of the GNU General Public License version 2 only, as
   21.10 + * published by the Free Software Foundation.  Oracle designates this
   21.11 + * particular file as subject to the "Classpath" exception as provided
   21.12 + * by Oracle in the LICENSE file that accompanied this code.
   21.13 + *
   21.14 + * This code is distributed in the hope that it will be useful, but WITHOUT
   21.15 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   21.16 + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
   21.17 + * version 2 for more details (a copy is included in the LICENSE file that
   21.18 + * accompanied this code).
   21.19 + *
   21.20 + * You should have received a copy of the GNU General Public License version
   21.21 + * 2 along with this work; if not, write to the Free Software Foundation,
   21.22 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
   21.23 + *
   21.24 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
   21.25 + * or visit www.oracle.com if you need additional information or have any
   21.26 + * questions.
   21.27 + */
   21.28 +
   21.29 +package javax.lang.model.util;
   21.30 +
   21.31 +import javax.lang.model.element.*;
   21.32 +import javax.annotation.processing.SupportedSourceVersion;
   21.33 +import static javax.lang.model.element.ElementKind.*;
   21.34 +import javax.lang.model.SourceVersion;
   21.35 +import static javax.lang.model.SourceVersion.*;
   21.36 +
   21.37 +
   21.38 +/**
   21.39 + * A scanning visitor of program elements with default behavior
   21.40 + * appropriate for the {@link SourceVersion#RELEASE_8 RELEASE_8}
   21.41 + * source version.  The <tt>visit<i>XYZ</i></tt> methods in this
   21.42 + * class scan their component elements by calling {@code scan} on
   21.43 + * their {@linkplain Element#getEnclosedElements enclosed elements},
   21.44 + * {@linkplain ExecutableElement#getParameters parameters}, etc., as
   21.45 + * indicated in the individual method specifications.  A subclass can
   21.46 + * control the order elements are visited by overriding the
   21.47 + * <tt>visit<i>XYZ</i></tt> methods.  Note that clients of a scanner
   21.48 + * may get the desired behavior be invoking {@code v.scan(e, p)} rather
   21.49 + * than {@code v.visit(e, p)} on the root objects of interest.
   21.50 + *
   21.51 + * <p>When a subclass overrides a <tt>visit<i>XYZ</i></tt> method, the
   21.52 + * new method can cause the enclosed elements to be scanned in the
   21.53 + * default way by calling <tt>super.visit<i>XYZ</i></tt>.  In this
   21.54 + * fashion, the concrete visitor can control the ordering of traversal
   21.55 + * over the component elements with respect to the additional
   21.56 + * processing; for example, consistently calling
   21.57 + * <tt>super.visit<i>XYZ</i></tt> at the start of the overridden
   21.58 + * methods will yield a preorder traversal, etc.  If the component
   21.59 + * elements should be traversed in some other order, instead of
   21.60 + * calling <tt>super.visit<i>XYZ</i></tt>, an overriding visit method
   21.61 + * should call {@code scan} with the elements in the desired order.
   21.62 + *
   21.63 + * <p> Methods in this class may be overridden subject to their
   21.64 + * general contract.  Note that annotating methods in concrete
   21.65 + * subclasses with {@link java.lang.Override @Override} will help
   21.66 + * ensure that methods are overridden as intended.
   21.67 + *
   21.68 + * <p> <b>WARNING:</b> The {@code ElementVisitor} interface
   21.69 + * implemented by this class may have methods added to it in the
   21.70 + * future to accommodate new, currently unknown, language structures
   21.71 + * added to future versions of the Java&trade; programming language.
   21.72 + * Therefore, methods whose names begin with {@code "visit"} may be
   21.73 + * added to this class in the future; to avoid incompatibilities,
   21.74 + * classes which extend this class should not declare any instance
   21.75 + * methods with names beginning with {@code "visit"}.
   21.76 + *
   21.77 + * <p>When such a new visit method is added, the default
   21.78 + * implementation in this class will be to call the {@link
   21.79 + * #visitUnknown visitUnknown} method.  A new element scanner visitor
   21.80 + * class will also be introduced to correspond to the new language
   21.81 + * level; this visitor will have different default behavior for the
   21.82 + * visit method in question.  When the new visitor is introduced, all
   21.83 + * or portions of this visitor may be deprecated.
   21.84 + *
   21.85 + * @param <R> the return type of this visitor's methods.  Use {@link
   21.86 + *            Void} for visitors that do not need to return results.
   21.87 + * @param <P> the type of the additional parameter to this visitor's
   21.88 + *            methods.  Use {@code Void} for visitors that do not need an
   21.89 + *            additional parameter.
   21.90 + *
   21.91 + * @see ElementScanner6
   21.92 + * @see ElementScanner7
   21.93 + * @since 1.8
   21.94 + */
   21.95 +@SupportedSourceVersion(RELEASE_8)
   21.96 +public class ElementScanner8<R, P> extends ElementScanner7<R, P> {
   21.97 +    /**
   21.98 +     * Constructor for concrete subclasses; uses {@code null} for the
   21.99 +     * default value.
  21.100 +     */
  21.101 +    protected ElementScanner8(){
  21.102 +        super(null);
  21.103 +    }
  21.104 +
  21.105 +    /**
  21.106 +     * Constructor for concrete subclasses; uses the argument for the
  21.107 +     * default value.
  21.108 +     */
  21.109 +    protected ElementScanner8(R defaultValue){
  21.110 +        super(defaultValue);
  21.111 +    }
  21.112 +}
    22.1 --- a/src/share/classes/javax/lang/model/util/SimpleAnnotationValueVisitor6.java	Fri Jul 01 14:28:19 2011 -0700
    22.2 +++ b/src/share/classes/javax/lang/model/util/SimpleAnnotationValueVisitor6.java	Tue Jul 05 16:37:24 2011 -0700
    22.3 @@ -1,5 +1,5 @@
    22.4  /*
    22.5 - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
    22.6 + * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
    22.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    22.8   *
    22.9   * This code is free software; you can redistribute it and/or modify it
   22.10 @@ -71,6 +71,7 @@
   22.11   * @author Peter von der Ah&eacute;
   22.12   *
   22.13   * @see SimpleAnnotationValueVisitor7
   22.14 + * @see SimpleAnnotationValueVisitor8
   22.15   * @since 1.6
   22.16   */
   22.17  @SupportedSourceVersion(RELEASE_6)
    23.1 --- a/src/share/classes/javax/lang/model/util/SimpleAnnotationValueVisitor7.java	Fri Jul 01 14:28:19 2011 -0700
    23.2 +++ b/src/share/classes/javax/lang/model/util/SimpleAnnotationValueVisitor7.java	Tue Jul 05 16:37:24 2011 -0700
    23.3 @@ -66,6 +66,7 @@
    23.4   * @param <P> the type of the additional parameter to this visitor's methods.
    23.5   *
    23.6   * @see SimpleAnnotationValueVisitor6
    23.7 + * @see SimpleAnnotationValueVisitor8
    23.8   * @since 1.7
    23.9   */
   23.10  @SupportedSourceVersion(RELEASE_7)
    24.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    24.2 +++ b/src/share/classes/javax/lang/model/util/SimpleAnnotationValueVisitor8.java	Tue Jul 05 16:37:24 2011 -0700
    24.3 @@ -0,0 +1,91 @@
    24.4 +/*
    24.5 + * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
    24.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    24.7 + *
    24.8 + * This code is free software; you can redistribute it and/or modify it
    24.9 + * under the terms of the GNU General Public License version 2 only, as
   24.10 + * published by the Free Software Foundation.  Oracle designates this
   24.11 + * particular file as subject to the "Classpath" exception as provided
   24.12 + * by Oracle in the LICENSE file that accompanied this code.
   24.13 + *
   24.14 + * This code is distributed in the hope that it will be useful, but WITHOUT
   24.15 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   24.16 + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
   24.17 + * version 2 for more details (a copy is included in the LICENSE file that
   24.18 + * accompanied this code).
   24.19 + *
   24.20 + * You should have received a copy of the GNU General Public License version
   24.21 + * 2 along with this work; if not, write to the Free Software Foundation,
   24.22 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
   24.23 + *
   24.24 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
   24.25 + * or visit www.oracle.com if you need additional information or have any
   24.26 + * questions.
   24.27 + */
   24.28 +
   24.29 +package javax.lang.model.util;
   24.30 +
   24.31 +import java.util.List;
   24.32 +import javax.lang.model.element.*;
   24.33 +
   24.34 +import javax.lang.model.type.TypeMirror;
   24.35 +import static javax.lang.model.SourceVersion.*;
   24.36 +import javax.lang.model.SourceVersion;
   24.37 +import javax.annotation.processing.SupportedSourceVersion;
   24.38 +
   24.39 +/**
   24.40 + * A simple visitor for annotation values with default behavior
   24.41 + * appropriate for the {@link SourceVersion#RELEASE_8 RELEASE_8}
   24.42 + * source version.  Visit methods call {@link #defaultAction
   24.43 + * defaultAction} passing their arguments to {@code defaultAction}'s
   24.44 + * corresponding parameters.
   24.45 + *
   24.46 + * <p> Methods in this class may be overridden subject to their
   24.47 + * general contract.  Note that annotating methods in concrete
   24.48 + * subclasses with {@link java.lang.Override @Override} will help
   24.49 + * ensure that methods are overridden as intended.
   24.50 + *
   24.51 + * <p> <b>WARNING:</b> The {@code AnnotationValueVisitor} interface
   24.52 + * implemented by this class may have methods added to it in the
   24.53 + * future to accommodate new, currently unknown, language structures
   24.54 + * added to future versions of the Java&trade; programming language.
   24.55 + * Therefore, methods whose names begin with {@code "visit"} may be
   24.56 + * added to this class in the future; to avoid incompatibilities,
   24.57 + * classes which extend this class should not declare any instance
   24.58 + * methods with names beginning with {@code "visit"}.
   24.59 + *
   24.60 + * <p>When such a new visit method is added, the default
   24.61 + * implementation in this class will be to call the {@link
   24.62 + * #visitUnknown visitUnknown} method.  A new simple annotation
   24.63 + * value visitor class will also be introduced to correspond to the
   24.64 + * new language level; this visitor will have different default
   24.65 + * behavior for the visit method in question.  When the new visitor is
   24.66 + * introduced, all or portions of this visitor may be deprecated.
   24.67 + *
   24.68 + * @param <R> the return type of this visitor's methods
   24.69 + * @param <P> the type of the additional parameter to this visitor's methods.
   24.70 + *
   24.71 + * @see SimpleAnnotationValueVisitor6
   24.72 + * @see SimpleAnnotationValueVisitor7
   24.73 + * @since 1.8
   24.74 + */
   24.75 +@SupportedSourceVersion(RELEASE_8)
   24.76 +public class SimpleAnnotationValueVisitor8<R, P> extends SimpleAnnotationValueVisitor7<R, P> {
   24.77 +    /**
   24.78 +     * Constructor for concrete subclasses; uses {@code null} for the
   24.79 +     * default value.
   24.80 +     */
   24.81 +    protected SimpleAnnotationValueVisitor8() {
   24.82 +        super(null);
   24.83 +    }
   24.84 +
   24.85 +    /**
   24.86 +     * Constructor for concrete subclasses; uses the argument for the
   24.87 +     * default value.
   24.88 +     *
   24.89 +     * @param defaultValue the value to assign to {@link #DEFAULT_VALUE}
   24.90 +     */
   24.91 +    protected SimpleAnnotationValueVisitor8(R defaultValue) {
   24.92 +        super(defaultValue);
   24.93 +    }
   24.94 +}
    25.1 --- a/src/share/classes/javax/lang/model/util/SimpleElementVisitor6.java	Fri Jul 01 14:28:19 2011 -0700
    25.2 +++ b/src/share/classes/javax/lang/model/util/SimpleElementVisitor6.java	Tue Jul 05 16:37:24 2011 -0700
    25.3 @@ -76,6 +76,7 @@
    25.4   * @author Peter von der Ah&eacute;
    25.5   *
    25.6   * @see SimpleElementVisitor7
    25.7 + * @see SimpleElementVisitor8
    25.8   * @since 1.6
    25.9   */
   25.10  @SupportedSourceVersion(RELEASE_6)
    26.1 --- a/src/share/classes/javax/lang/model/util/SimpleElementVisitor7.java	Fri Jul 01 14:28:19 2011 -0700
    26.2 +++ b/src/share/classes/javax/lang/model/util/SimpleElementVisitor7.java	Tue Jul 05 16:37:24 2011 -0700
    26.3 @@ -69,6 +69,7 @@
    26.4   *              for visitors that do not need an additional parameter.
    26.5   *
    26.6   * @see SimpleElementVisitor6
    26.7 + * @see SimpleElementVisitor8
    26.8   * @since 1.7
    26.9   */
   26.10  @SupportedSourceVersion(RELEASE_7)
    27.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    27.2 +++ b/src/share/classes/javax/lang/model/util/SimpleElementVisitor8.java	Tue Jul 05 16:37:24 2011 -0700
    27.3 @@ -0,0 +1,94 @@
    27.4 +/*
    27.5 + * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
    27.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    27.7 + *
    27.8 + * This code is free software; you can redistribute it and/or modify it
    27.9 + * under the terms of the GNU General Public License version 2 only, as
   27.10 + * published by the Free Software Foundation.  Oracle designates this
   27.11 + * particular file as subject to the "Classpath" exception as provided
   27.12 + * by Oracle in the LICENSE file that accompanied this code.
   27.13 + *
   27.14 + * This code is distributed in the hope that it will be useful, but WITHOUT
   27.15 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   27.16 + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
   27.17 + * version 2 for more details (a copy is included in the LICENSE file that
   27.18 + * accompanied this code).
   27.19 + *
   27.20 + * You should have received a copy of the GNU General Public License version
   27.21 + * 2 along with this work; if not, write to the Free Software Foundation,
   27.22 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
   27.23 + *
   27.24 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
   27.25 + * or visit www.oracle.com if you need additional information or have any
   27.26 + * questions.
   27.27 + */
   27.28 +
   27.29 +package javax.lang.model.util;
   27.30 +
   27.31 +import javax.lang.model.element.*;
   27.32 +import javax.annotation.processing.SupportedSourceVersion;
   27.33 +import static javax.lang.model.element.ElementKind.*;
   27.34 +import javax.lang.model.SourceVersion;
   27.35 +import static javax.lang.model.SourceVersion.*;
   27.36 +
   27.37 +/**
   27.38 + * A simple visitor of program elements with default behavior
   27.39 + * appropriate for the {@link SourceVersion#RELEASE_8 RELEASE_8}
   27.40 + * source version.
   27.41 + *
   27.42 + * Visit methods corresponding to {@code RELEASE_7} and earlier
   27.43 + * language constructs call {@link #defaultAction defaultAction},
   27.44 + * passing their arguments to {@code defaultAction}'s corresponding
   27.45 + * parameters.
   27.46 + *
   27.47 + * <p> Methods in this class may be overridden subject to their
   27.48 + * general contract.  Note that annotating methods in concrete
   27.49 + * subclasses with {@link java.lang.Override @Override} will help
   27.50 + * ensure that methods are overridden as intended.
   27.51 + *
   27.52 + * <p> <b>WARNING:</b> The {@code ElementVisitor} interface
   27.53 + * implemented by this class may have methods added to it in the
   27.54 + * future to accommodate new, currently unknown, language structures
   27.55 + * added to future versions of the Java&trade; programming language.
   27.56 + * Therefore, methods whose names begin with {@code "visit"} may be
   27.57 + * added to this class in the future; to avoid incompatibilities,
   27.58 + * classes which extend this class should not declare any instance
   27.59 + * methods with names beginning with {@code "visit"}.
   27.60 + *
   27.61 + * <p>When such a new visit method is added, the default
   27.62 + * implementation in this class will be to call the {@link
   27.63 + * #visitUnknown visitUnknown} method.  A new simple element visitor
   27.64 + * class will also be introduced to correspond to the new language
   27.65 + * level; this visitor will have different default behavior for the
   27.66 + * visit method in question.  When the new visitor is introduced, all
   27.67 + * or portions of this visitor may be deprecated.
   27.68 + *
   27.69 + * @param <R> the return type of this visitor's methods.  Use {@code Void}
   27.70 + *             for visitors that do not need to return results.
   27.71 + * @param <P> the type of the additional parameter to this visitor's methods.  Use {@code Void}
   27.72 + *              for visitors that do not need an additional parameter.
   27.73 + *
   27.74 + * @see SimpleElementVisitor6
   27.75 + * @see SimpleElementVisitor7
   27.76 + * @since 1.8
   27.77 + */
   27.78 +@SupportedSourceVersion(RELEASE_8)
   27.79 +public class SimpleElementVisitor8<R, P> extends SimpleElementVisitor7<R, P> {
   27.80 +    /**
   27.81 +     * Constructor for concrete subclasses; uses {@code null} for the
   27.82 +     * default value.
   27.83 +     */
   27.84 +    protected SimpleElementVisitor8(){
   27.85 +        super(null);
   27.86 +    }
   27.87 +
   27.88 +    /**
   27.89 +     * Constructor for concrete subclasses; uses the argument for the
   27.90 +     * default value.
   27.91 +     *
   27.92 +     * @param defaultValue the value to assign to {@link #DEFAULT_VALUE}
   27.93 +     */
   27.94 +    protected SimpleElementVisitor8(R defaultValue){
   27.95 +        super(defaultValue);
   27.96 +    }
   27.97 +}
    28.1 --- a/src/share/classes/javax/lang/model/util/SimpleTypeVisitor6.java	Fri Jul 01 14:28:19 2011 -0700
    28.2 +++ b/src/share/classes/javax/lang/model/util/SimpleTypeVisitor6.java	Tue Jul 05 16:37:24 2011 -0700
    28.3 @@ -75,6 +75,7 @@
    28.4   * @author Peter von der Ah&eacute;
    28.5   *
    28.6   * @see SimpleTypeVisitor7
    28.7 + * @see SimpleTypeVisitor8
    28.8   * @since 1.6
    28.9   */
   28.10  @SupportedSourceVersion(RELEASE_6)
    29.1 --- a/src/share/classes/javax/lang/model/util/SimpleTypeVisitor7.java	Fri Jul 01 14:28:19 2011 -0700
    29.2 +++ b/src/share/classes/javax/lang/model/util/SimpleTypeVisitor7.java	Tue Jul 05 16:37:24 2011 -0700
    29.3 @@ -68,6 +68,7 @@
    29.4   *            additional parameter.
    29.5   *
    29.6   * @see SimpleTypeVisitor6
    29.7 + * @see SimpleTypeVisitor8
    29.8   * @since 1.7
    29.9   */
   29.10  @SupportedSourceVersion(RELEASE_7)
    30.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    30.2 +++ b/src/share/classes/javax/lang/model/util/SimpleTypeVisitor8.java	Tue Jul 05 16:37:24 2011 -0700
    30.3 @@ -0,0 +1,93 @@
    30.4 +/*
    30.5 + * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
    30.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    30.7 + *
    30.8 + * This code is free software; you can redistribute it and/or modify it
    30.9 + * under the terms of the GNU General Public License version 2 only, as
   30.10 + * published by the Free Software Foundation.  Oracle designates this
   30.11 + * particular file as subject to the "Classpath" exception as provided
   30.12 + * by Oracle in the LICENSE file that accompanied this code.
   30.13 + *
   30.14 + * This code is distributed in the hope that it will be useful, but WITHOUT
   30.15 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   30.16 + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
   30.17 + * version 2 for more details (a copy is included in the LICENSE file that
   30.18 + * accompanied this code).
   30.19 + *
   30.20 + * You should have received a copy of the GNU General Public License version
   30.21 + * 2 along with this work; if not, write to the Free Software Foundation,
   30.22 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
   30.23 + *
   30.24 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
   30.25 + * or visit www.oracle.com if you need additional information or have any
   30.26 + * questions.
   30.27 + */
   30.28 +
   30.29 +package javax.lang.model.util;
   30.30 +
   30.31 +import javax.lang.model.type.*;
   30.32 +import javax.annotation.processing.SupportedSourceVersion;
   30.33 +import javax.lang.model.SourceVersion;
   30.34 +import static javax.lang.model.SourceVersion.*;
   30.35 +
   30.36 +/**
   30.37 + * A simple visitor of types with default behavior appropriate for the
   30.38 + * {@link SourceVersion#RELEASE_7 RELEASE_7} source version.
   30.39 + *
   30.40 + * Visit methods corresponding to {@code RELEASE_8} and earlier
   30.41 + * language constructs call {@link #defaultAction defaultAction},
   30.42 + * passing their arguments to {@code defaultAction}'s corresponding
   30.43 + * parameters.
   30.44 + *
   30.45 + * <p> Methods in this class may be overridden subject to their
   30.46 + * general contract.  Note that annotating methods in concrete
   30.47 + * subclasses with {@link java.lang.Override @Override} will help
   30.48 + * ensure that methods are overridden as intended.
   30.49 + *
   30.50 + * <p> <b>WARNING:</b> The {@code TypeVisitor} interface implemented
   30.51 + * by this class may have methods added to it in the future to
   30.52 + * accommodate new, currently unknown, language structures added to
   30.53 + * future versions of the Java&trade; programming language.
   30.54 + * Therefore, methods whose names begin with {@code "visit"} may be
   30.55 + * added to this class in the future; to avoid incompatibilities,
   30.56 + * classes which extend this class should not declare any instance
   30.57 + * methods with names beginning with {@code "visit"}.
   30.58 + *
   30.59 + * <p>When such a new visit method is added, the default
   30.60 + * implementation in this class will be to call the {@link
   30.61 + * #visitUnknown visitUnknown} method.  A new simple type visitor
   30.62 + * class will also be introduced to correspond to the new language
   30.63 + * level; this visitor will have different default behavior for the
   30.64 + * visit method in question.  When the new visitor is introduced, all
   30.65 + * or portions of this visitor may be deprecated.
   30.66 + *
   30.67 + * @param <R> the return type of this visitor's methods.  Use {@link
   30.68 + *            Void} for visitors that do not need to return results.
   30.69 + * @param <P> the type of the additional parameter to this visitor's
   30.70 + *            methods.  Use {@code Void} for visitors that do not need an
   30.71 + *            additional parameter.
   30.72 + *
   30.73 + * @see SimpleTypeVisitor6
   30.74 + * @see SimpleTypeVisitor7
   30.75 + * @since 1.8
   30.76 + */
   30.77 +@SupportedSourceVersion(RELEASE_8)
   30.78 +public class SimpleTypeVisitor8<R, P> extends SimpleTypeVisitor7<R, P> {
   30.79 +    /**
   30.80 +     * Constructor for concrete subclasses; uses {@code null} for the
   30.81 +     * default value.
   30.82 +     */
   30.83 +    protected SimpleTypeVisitor8(){
   30.84 +        super(null);
   30.85 +    }
   30.86 +
   30.87 +    /**
   30.88 +     * Constructor for concrete subclasses; uses the argument for the
   30.89 +     * default value.
   30.90 +     *
   30.91 +     * @param defaultValue the value to assign to {@link #DEFAULT_VALUE}
   30.92 +     */
   30.93 +    protected SimpleTypeVisitor8(R defaultValue){
   30.94 +        super(defaultValue);
   30.95 +    }
   30.96 +}
    31.1 --- a/src/share/classes/javax/lang/model/util/TypeKindVisitor6.java	Fri Jul 01 14:28:19 2011 -0700
    31.2 +++ b/src/share/classes/javax/lang/model/util/TypeKindVisitor6.java	Tue Jul 05 16:37:24 2011 -0700
    31.3 @@ -1,5 +1,5 @@
    31.4  /*
    31.5 - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
    31.6 + * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
    31.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    31.8   *
    31.9   * This code is free software; you can redistribute it and/or modify it
   31.10 @@ -76,6 +76,7 @@
   31.11   * @author Peter von der Ah&eacute;
   31.12   *
   31.13   * @see TypeKindVisitor7
   31.14 + * @see TypeKindVisitor8
   31.15   * @since 1.6
   31.16   */
   31.17  @SupportedSourceVersion(RELEASE_6)
    32.1 --- a/src/share/classes/javax/lang/model/util/TypeKindVisitor7.java	Fri Jul 01 14:28:19 2011 -0700
    32.2 +++ b/src/share/classes/javax/lang/model/util/TypeKindVisitor7.java	Tue Jul 05 16:37:24 2011 -0700
    32.3 @@ -71,6 +71,7 @@
    32.4   *            additional parameter.
    32.5   *
    32.6   * @see TypeKindVisitor6
    32.7 + * @see TypeKindVisitor8
    32.8   * @since 1.7
    32.9   */
   32.10  @SupportedSourceVersion(RELEASE_7)
    33.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    33.2 +++ b/src/share/classes/javax/lang/model/util/TypeKindVisitor8.java	Tue Jul 05 16:37:24 2011 -0700
    33.3 @@ -0,0 +1,96 @@
    33.4 +/*
    33.5 + * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
    33.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    33.7 + *
    33.8 + * This code is free software; you can redistribute it and/or modify it
    33.9 + * under the terms of the GNU General Public License version 2 only, as
   33.10 + * published by the Free Software Foundation.  Oracle designates this
   33.11 + * particular file as subject to the "Classpath" exception as provided
   33.12 + * by Oracle in the LICENSE file that accompanied this code.
   33.13 + *
   33.14 + * This code is distributed in the hope that it will be useful, but WITHOUT
   33.15 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   33.16 + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
   33.17 + * version 2 for more details (a copy is included in the LICENSE file that
   33.18 + * accompanied this code).
   33.19 + *
   33.20 + * You should have received a copy of the GNU General Public License version
   33.21 + * 2 along with this work; if not, write to the Free Software Foundation,
   33.22 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
   33.23 + *
   33.24 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
   33.25 + * or visit www.oracle.com if you need additional information or have any
   33.26 + * questions.
   33.27 + */
   33.28 +
   33.29 +package javax.lang.model.util;
   33.30 +
   33.31 +import javax.lang.model.type.*;
   33.32 +import javax.annotation.processing.SupportedSourceVersion;
   33.33 +import static javax.lang.model.element.ElementKind.*;
   33.34 +import static javax.lang.model.SourceVersion.*;
   33.35 +import javax.lang.model.SourceVersion;
   33.36 +
   33.37 +/**
   33.38 + * A visitor of types based on their {@linkplain TypeKind kind} with
   33.39 + * default behavior appropriate for the {@link SourceVersion#RELEASE_8
   33.40 + * RELEASE_8} source version.  For {@linkplain
   33.41 + * TypeMirror types} <tt><i>XYZ</i></tt> that may have more than one
   33.42 + * kind, the <tt>visit<i>XYZ</i></tt> methods in this class delegate
   33.43 + * to the <tt>visit<i>XYZKind</i></tt> method corresponding to the
   33.44 + * first argument's kind.  The <tt>visit<i>XYZKind</i></tt> methods
   33.45 + * call {@link #defaultAction defaultAction}, passing their arguments
   33.46 + * to {@code defaultAction}'s corresponding parameters.
   33.47 + *
   33.48 + * <p> Methods in this class may be overridden subject to their
   33.49 + * general contract.  Note that annotating methods in concrete
   33.50 + * subclasses with {@link java.lang.Override @Override} will help
   33.51 + * ensure that methods are overridden as intended.
   33.52 + *
   33.53 + * <p> <b>WARNING:</b> The {@code TypeVisitor} interface implemented
   33.54 + * by this class may have methods added to it in the future to
   33.55 + * accommodate new, currently unknown, language structures added to
   33.56 + * future versions of the Java&trade; programming language.
   33.57 + * Therefore, methods whose names begin with {@code "visit"} may be
   33.58 + * added to this class in the future; to avoid incompatibilities,
   33.59 + * classes which extend this class should not declare any instance
   33.60 + * methods with names beginning with {@code "visit"}.
   33.61 + *
   33.62 + * <p>When such a new visit method is added, the default
   33.63 + * implementation in this class will be to call the {@link
   33.64 + * #visitUnknown visitUnknown} method.  A new type kind visitor class
   33.65 + * will also be introduced to correspond to the new language level;
   33.66 + * this visitor will have different default behavior for the visit
   33.67 + * method in question.  When the new visitor is introduced, all or
   33.68 + * portions of this visitor may be deprecated.
   33.69 + *
   33.70 + * @param <R> the return type of this visitor's methods.  Use {@link
   33.71 + *            Void} for visitors that do not need to return results.
   33.72 + * @param <P> the type of the additional parameter to this visitor's
   33.73 + *            methods.  Use {@code Void} for visitors that do not need an
   33.74 + *            additional parameter.
   33.75 + *
   33.76 + * @see TypeKindVisitor6
   33.77 + * @see TypeKindVisitor7
   33.78 + * @since 1.8
   33.79 + */
   33.80 +@SupportedSourceVersion(RELEASE_8)
   33.81 +public class TypeKindVisitor8<R, P> extends TypeKindVisitor7<R, P> {
   33.82 +    /**
   33.83 +     * Constructor for concrete subclasses to call; uses {@code null}
   33.84 +     * for the default value.
   33.85 +     */
   33.86 +    protected TypeKindVisitor8() {
   33.87 +        super(null);
   33.88 +    }
   33.89 +
   33.90 +    /**
   33.91 +     * Constructor for concrete subclasses to call; uses the argument
   33.92 +     * for the default value.
   33.93 +     *
   33.94 +     * @param defaultValue the value to assign to {@link #DEFAULT_VALUE}
   33.95 +     */
   33.96 +    protected TypeKindVisitor8(R defaultValue) {
   33.97 +        super(defaultValue);
   33.98 +    }
   33.99 +}
    34.1 --- a/src/share/sample/javac/processing/src/CheckNamesProcessor.java	Fri Jul 01 14:28:19 2011 -0700
    34.2 +++ b/src/share/sample/javac/processing/src/CheckNamesProcessor.java	Tue Jul 05 16:37:24 2011 -0700
    34.3 @@ -1,5 +1,5 @@
    34.4  /*
    34.5 - * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
    34.6 + * Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved.
    34.7   *
    34.8   * Redistribution and use in source and binary forms, with or without
    34.9   * modification, are permitted provided that the following conditions
   34.10 @@ -138,7 +138,7 @@
   34.11      public SourceVersion getSupportedSourceVersion() {
   34.12          /*
   34.13           * Return latest source version instead of a fixed version
   34.14 -         * like RELEASE_7.  To return a fixed version, this class
   34.15 +         * like RELEASE_8.  To return a fixed version, this class
   34.16           * could be annotated with a SupportedSourceVersion
   34.17           * annotation.
   34.18           *
   34.19 @@ -192,7 +192,7 @@
   34.20          /**
   34.21           * Visitor to implement name checks.
   34.22           */
   34.23 -        private class NameCheckScanner extends ElementScanner7<Void, Void> {
   34.24 +        private class NameCheckScanner extends ElementScanner8<Void, Void> {
   34.25              // The visitor could be enhanced to return true/false if
   34.26              // there were warnings reported or a count of the number
   34.27              // of warnings.  This could be facilitated by using
    35.1 --- a/test/tools/javac/6402516/CheckLocalElements.java	Fri Jul 01 14:28:19 2011 -0700
    35.2 +++ b/test/tools/javac/6402516/CheckLocalElements.java	Tue Jul 05 16:37:24 2011 -0700
    35.3 @@ -1,5 +1,5 @@
    35.4  /*
    35.5 - * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
    35.6 + * Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved.
    35.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    35.8   *
    35.9   * This code is free software; you can redistribute it and/or modify it
   35.10 @@ -95,7 +95,7 @@
   35.11          return encl == null ? "" : encl.accept(qualNameVisitor, null);
   35.12      }
   35.13  
   35.14 -    private ElementVisitor<String,Void> qualNameVisitor = new SimpleElementVisitor7<String,Void>() {
   35.15 +    private ElementVisitor<String,Void> qualNameVisitor = new SimpleElementVisitor8<String,Void>() {
   35.16          protected String defaultAction(Element e, Void ignore) {
   35.17              return "";
   35.18          }
    36.1 --- a/test/tools/javac/api/TestOperators.java	Fri Jul 01 14:28:19 2011 -0700
    36.2 +++ b/test/tools/javac/api/TestOperators.java	Tue Jul 05 16:37:24 2011 -0700
    36.3 @@ -1,5 +1,5 @@
    36.4  /*
    36.5 - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
    36.6 + * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
    36.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    36.8   *
    36.9   * This code is free software; you can redistribute it and/or modify it
   36.10 @@ -26,7 +26,8 @@
   36.11   * @bug     6338064 6346249 6340951 6392177
   36.12   * @summary Tree API: can't determine kind of operator
   36.13   * @author  Peter von der Ah\u00e9
   36.14 - * @compile TestOperators.java
   36.15 + * @library ../lib
   36.16 + * @build JavacTestingAbstractProcessor TestOperators
   36.17   * @compile -processor TestOperators -proc:only TestOperators.java
   36.18   */
   36.19  
   36.20 @@ -46,7 +47,7 @@
   36.21  }
   36.22  
   36.23  @SupportedAnnotationTypes("TestMe")
   36.24 -public class TestOperators extends AbstractProcessor {
   36.25 +public class TestOperators extends JavacTestingAbstractProcessor {
   36.26  
   36.27      @TestMe(POSTFIX_INCREMENT)
   36.28      public int test_POSTFIX_INCREMENT(int i) {
   36.29 @@ -299,7 +300,7 @@
   36.30          final Trees trees = Trees.instance(processingEnv);
   36.31          final Messager log = processingEnv.getMessager();
   36.32          final Elements elements = processingEnv.getElementUtils();
   36.33 -        class Scan extends ElementScanner7<Void,Void> {
   36.34 +        class Scan extends ElementScanner<Void,Void> {
   36.35              @Override
   36.36              public Void visitExecutable(ExecutableElement e, Void p) {
   36.37                  Object debug = e; // info for exception handler
   36.38 @@ -343,5 +344,4 @@
   36.39          }
   36.40          return true;
   36.41      }
   36.42 -
   36.43  }
    37.1 --- a/test/tools/javac/enum/6350057/T6350057.java	Fri Jul 01 14:28:19 2011 -0700
    37.2 +++ b/test/tools/javac/enum/6350057/T6350057.java	Tue Jul 05 16:37:24 2011 -0700
    37.3 @@ -1,5 +1,5 @@
    37.4  /*
    37.5 - * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
    37.6 + * Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved.
    37.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    37.8   *
    37.9   * This code is free software; you can redistribute it and/or modify it
   37.10 @@ -23,10 +23,11 @@
   37.11  
   37.12  /*
   37.13   * @test
   37.14 - * @bug 6350057
   37.15 + * @bug 6350057 7025809
   37.16   * @summary Test that parameters on implicit enum methods have the right kind
   37.17   * @author  Joseph D. Darcy
   37.18 - * @compile T6350057.java
   37.19 + * @library ../../lib
   37.20 + * @build   JavacTestingAbstractProcessor T6350057
   37.21   * @compile -processor T6350057 -proc:only TestEnum.java
   37.22   */
   37.23  
   37.24 @@ -38,9 +39,8 @@
   37.25  import javax.lang.model.util.*;
   37.26  import static javax.tools.Diagnostic.Kind.*;
   37.27  
   37.28 -@SupportedAnnotationTypes("*")
   37.29 -public class T6350057 extends AbstractProcessor {
   37.30 -    static class LocalVarAllergy extends ElementKindVisitor6<Boolean, Void> {
   37.31 +public class T6350057 extends JavacTestingAbstractProcessor {
   37.32 +    static class LocalVarAllergy extends ElementKindVisitor<Boolean, Void> {
   37.33          @Override
   37.34          public Boolean visitTypeAsEnum(TypeElement e, Void v) {
   37.35              System.out.println("visitTypeAsEnum: " + e.getSimpleName().toString());
    38.1 --- a/test/tools/javac/enum/6424358/T6424358.java	Fri Jul 01 14:28:19 2011 -0700
    38.2 +++ b/test/tools/javac/enum/6424358/T6424358.java	Tue Jul 05 16:37:24 2011 -0700
    38.3 @@ -1,5 +1,5 @@
    38.4  /*
    38.5 - * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
    38.6 + * Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved.
    38.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    38.8   *
    38.9   * This code is free software; you can redistribute it and/or modify it
   38.10 @@ -23,10 +23,11 @@
   38.11  
   38.12  /*
   38.13   * @test
   38.14 - * @bug     6424358
   38.15 + * @bug     6424358 7025809
   38.16   * @summary Synthesized static enum method values() is final
   38.17   * @author  Peter von der Ah\u00e9
   38.18 - * @compile T6424358.java
   38.19 + * @library ../../lib
   38.20 + * @build   JavacTestingAbstractProcessor T6424358
   38.21   * @compile -processor T6424358 -proc:only T6424358.java
   38.22   */
   38.23  
   38.24 @@ -39,8 +40,7 @@
   38.25  
   38.26  @interface TestMe {}
   38.27  
   38.28 -@SupportedAnnotationTypes("*")
   38.29 -public class T6424358 extends AbstractProcessor {
   38.30 +public class T6424358 extends JavacTestingAbstractProcessor {
   38.31      @TestMe enum Test { FOO; }
   38.32  
   38.33      public boolean process(Set<? extends TypeElement> annotations,
   38.34 @@ -48,7 +48,7 @@
   38.35          final Messager log = processingEnv.getMessager();
   38.36          final Elements elements = processingEnv.getElementUtils();
   38.37          final TypeElement testMe = elements.getTypeElement("TestMe");
   38.38 -        class Scan extends ElementScanner7<Void,Void> {
   38.39 +        class Scan extends ElementScanner<Void,Void> {
   38.40              @Override
   38.41              public Void visitExecutable(ExecutableElement e, Void p) {
   38.42                  System.err.println("Looking at " + e);
   38.43 @@ -65,9 +65,4 @@
   38.44              scan.scan(e);
   38.45          return true;
   38.46      }
   38.47 -
   38.48 -    @Override
   38.49 -    public SourceVersion getSupportedSourceVersion() {
   38.50 -        return SourceVersion.latest();
   38.51 -    }
   38.52  }
    39.1 --- a/test/tools/javac/failover/FailOver15.out	Fri Jul 01 14:28:19 2011 -0700
    39.2 +++ b/test/tools/javac/failover/FailOver15.out	Tue Jul 05 16:37:24 2011 -0700
    39.3 @@ -1,4 +1,3 @@
    39.4  FailOver15.java:17:10: compiler.err.expected: ';'
    39.5  FailOver15.java:11:13: compiler.err.cant.resolve.location: kindname.class, UnknownClass, , , (compiler.misc.location: kindname.class, Test, null)
    39.6  2 errors
    39.7 -
    40.1 --- a/test/tools/javac/lib/JavacTestingAbstractProcessor.java	Fri Jul 01 14:28:19 2011 -0700
    40.2 +++ b/test/tools/javac/lib/JavacTestingAbstractProcessor.java	Tue Jul 05 16:37:24 2011 -0700
    40.3 @@ -25,6 +25,7 @@
    40.4  import javax.annotation.processing.*;
    40.5  import javax.lang.model.SourceVersion;
    40.6  import javax.lang.model.util.*;
    40.7 +import static javax.lang.model.SourceVersion.*;
    40.8  
    40.9  /**
   40.10   * An abstract annotation processor tailored to javac regression testing.
   40.11 @@ -95,4 +96,164 @@
   40.12          messager  = processingEnv.getMessager();
   40.13          options   = processingEnv.getOptions();
   40.14      }
   40.15 +
   40.16 +    /*
   40.17 +     * The set of visitors below will directly extend the most recent
   40.18 +     * corresponding platform visitor type.
   40.19 +     */
   40.20 +
   40.21 +    @SupportedSourceVersion(RELEASE_8)
   40.22 +    public static abstract class AbstractAnnotationValueVisitor<R, P> extends AbstractAnnotationValueVisitor8<R, P> {
   40.23 +
   40.24 +        /**
   40.25 +         * Constructor for concrete subclasses to call.
   40.26 +         */
   40.27 +        protected AbstractAnnotationValueVisitor() {
   40.28 +            super();
   40.29 +        }
   40.30 +    }
   40.31 +
   40.32 +    @SupportedSourceVersion(RELEASE_8)
   40.33 +    public static abstract class AbstractElementVisitor<R, P> extends AbstractElementVisitor8<R, P> {
   40.34 +        /**
   40.35 +         * Constructor for concrete subclasses to call.
   40.36 +         */
   40.37 +        protected AbstractElementVisitor(){
   40.38 +            super();
   40.39 +        }
   40.40 +    }
   40.41 +
   40.42 +    @SupportedSourceVersion(RELEASE_8)
   40.43 +    public static abstract class AbstractTypeVisitor<R, P> extends AbstractTypeVisitor8<R, P> {
   40.44 +        /**
   40.45 +         * Constructor for concrete subclasses to call.
   40.46 +         */
   40.47 +        protected AbstractTypeVisitor() {
   40.48 +            super();
   40.49 +        }
   40.50 +    }
   40.51 +
   40.52 +    @SupportedSourceVersion(RELEASE_8)
   40.53 +    public static class ElementKindVisitor<R, P> extends ElementKindVisitor8<R, P> {
   40.54 +        /**
   40.55 +         * Constructor for concrete subclasses; uses {@code null} for the
   40.56 +         * default value.
   40.57 +         */
   40.58 +        protected ElementKindVisitor() {
   40.59 +            super(null);
   40.60 +        }
   40.61 +
   40.62 +        /**
   40.63 +         * Constructor for concrete subclasses; uses the argument for the
   40.64 +         * default value.
   40.65 +         *
   40.66 +         * @param defaultValue the value to assign to {@link #DEFAULT_VALUE}
   40.67 +         */
   40.68 +        protected ElementKindVisitor(R defaultValue) {
   40.69 +            super(defaultValue);
   40.70 +        }
   40.71 +    }
   40.72 +
   40.73 +    @SupportedSourceVersion(RELEASE_8)
   40.74 +    public static class ElementScanner<R, P> extends ElementScanner8<R, P> {
   40.75 +        /**
   40.76 +         * Constructor for concrete subclasses; uses {@code null} for the
   40.77 +         * default value.
   40.78 +         */
   40.79 +        protected ElementScanner(){
   40.80 +            super(null);
   40.81 +        }
   40.82 +
   40.83 +        /**
   40.84 +         * Constructor for concrete subclasses; uses the argument for the
   40.85 +         * default value.
   40.86 +         */
   40.87 +        protected ElementScanner(R defaultValue){
   40.88 +            super(defaultValue);
   40.89 +        }
   40.90 +    }
   40.91 +
   40.92 +    @SupportedSourceVersion(RELEASE_8)
   40.93 +    public static class SimpleAnnotationValueVisitor<R, P> extends SimpleAnnotationValueVisitor8<R, P> {
   40.94 +        /**
   40.95 +         * Constructor for concrete subclasses; uses {@code null} for the
   40.96 +         * default value.
   40.97 +         */
   40.98 +        protected SimpleAnnotationValueVisitor() {
   40.99 +            super(null);
  40.100 +        }
  40.101 +
  40.102 +        /**
  40.103 +         * Constructor for concrete subclasses; uses the argument for the
  40.104 +         * default value.
  40.105 +         *
  40.106 +         * @param defaultValue the value to assign to {@link #DEFAULT_VALUE}
  40.107 +         */
  40.108 +        protected SimpleAnnotationValueVisitor(R defaultValue) {
  40.109 +            super(defaultValue);
  40.110 +        }
  40.111 +    }
  40.112 +
  40.113 +    @SupportedSourceVersion(RELEASE_8)
  40.114 +    public static class SimpleElementVisitor<R, P> extends SimpleElementVisitor8<R, P> {
  40.115 +        /**
  40.116 +         * Constructor for concrete subclasses; uses {@code null} for the
  40.117 +         * default value.
  40.118 +         */
  40.119 +        protected SimpleElementVisitor(){
  40.120 +            super(null);
  40.121 +        }
  40.122 +
  40.123 +        /**
  40.124 +         * Constructor for concrete subclasses; uses the argument for the
  40.125 +         * default value.
  40.126 +         *
  40.127 +         * @param defaultValue the value to assign to {@link #DEFAULT_VALUE}
  40.128 +         */
  40.129 +        protected SimpleElementVisitor(R defaultValue){
  40.130 +            super(defaultValue);
  40.131 +        }
  40.132 +    }
  40.133 +
  40.134 +    @SupportedSourceVersion(RELEASE_8)
  40.135 +    public static class SimpleTypeVisitor<R, P> extends SimpleTypeVisitor8<R, P> {
  40.136 +        /**
  40.137 +         * Constructor for concrete subclasses; uses {@code null} for the
  40.138 +         * default value.
  40.139 +         */
  40.140 +        protected SimpleTypeVisitor(){
  40.141 +            super(null);
  40.142 +        }
  40.143 +
  40.144 +        /**
  40.145 +         * Constructor for concrete subclasses; uses the argument for the
  40.146 +         * default value.
  40.147 +         *
  40.148 +         * @param defaultValue the value to assign to {@link #DEFAULT_VALUE}
  40.149 +         */
  40.150 +        protected SimpleTypeVisitor(R defaultValue){
  40.151 +            super(defaultValue);
  40.152 +        }
  40.153 +    }
  40.154 +
  40.155 +    @SupportedSourceVersion(RELEASE_8)
  40.156 +    public static class TypeKindVisitor<R, P> extends TypeKindVisitor8<R, P> {
  40.157 +        /**
  40.158 +         * Constructor for concrete subclasses to call; uses {@code null}
  40.159 +         * for the default value.
  40.160 +         */
  40.161 +        protected TypeKindVisitor() {
  40.162 +            super(null);
  40.163 +        }
  40.164 +
  40.165 +        /**
  40.166 +         * Constructor for concrete subclasses to call; uses the argument
  40.167 +         * for the default value.
  40.168 +         *
  40.169 +         * @param defaultValue the value to assign to {@link #DEFAULT_VALUE}
  40.170 +         */
  40.171 +        protected TypeKindVisitor(R defaultValue) {
  40.172 +            super(defaultValue);
  40.173 +        }
  40.174 +    }
  40.175  }
    41.1 --- a/test/tools/javac/multicatch/model/ModelChecker.java	Fri Jul 01 14:28:19 2011 -0700
    41.2 +++ b/test/tools/javac/multicatch/model/ModelChecker.java	Tue Jul 05 16:37:24 2011 -0700
    41.3 @@ -23,7 +23,7 @@
    41.4  
    41.5  /*
    41.6   * @test
    41.7 - * @bug 6993963
    41.8 + * @bug 6993963 7025809
    41.9   * @summary Project Coin: Use precise exception analysis for effectively final catch parameters
   41.10   * @library ../../lib
   41.11   * @build JavacTestingAbstractProcessor ModelChecker
   41.12 @@ -107,7 +107,7 @@
   41.13              ; // Expected
   41.14          }
   41.15  
   41.16 -        UnionType unionType = new SimpleTypeVisitor7<UnionType, Void>(){
   41.17 +        UnionType unionType = new SimpleTypeVisitor<UnionType, Void>(){
   41.18              @Override
   41.19              protected UnionType defaultAction(TypeMirror e, Void p) {return null;}
   41.20  
    42.1 --- a/test/tools/javac/processing/model/6194785/T6194785.java	Fri Jul 01 14:28:19 2011 -0700
    42.2 +++ b/test/tools/javac/processing/model/6194785/T6194785.java	Tue Jul 05 16:37:24 2011 -0700
    42.3 @@ -1,5 +1,5 @@
    42.4  /*
    42.5 - * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
    42.6 + * Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved.
    42.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    42.8   *
    42.9   * This code is free software; you can redistribute it and/or modify it
   42.10 @@ -21,7 +21,7 @@
   42.11   * questions.
   42.12   */
   42.13  
   42.14 -/**
   42.15 +/*
   42.16   * @test
   42.17   * @bug     6194785
   42.18   * @summary ParameterDeclaration.getSimpleName does not return actual name from class files
   42.19 @@ -40,9 +40,8 @@
   42.20  
   42.21  public class T6194785 extends JavacTestingAbstractProcessor {
   42.22      public boolean process(Set<? extends TypeElement> annotations,
   42.23 -                           RoundEnvironment roundEnvironment)
   42.24 -    {
   42.25 -        class Scan extends ElementScanner7<Void,Void> {
   42.26 +                           RoundEnvironment roundEnvironment) {
   42.27 +        class Scan extends ElementScanner<Void,Void> {
   42.28              @Override
   42.29              public Void visitExecutable(ExecutableElement e, Void ignored) {
   42.30                  for (VariableElement p : e.getParameters())
    43.1 --- a/test/tools/javac/processing/model/TestSymtabItems.java	Fri Jul 01 14:28:19 2011 -0700
    43.2 +++ b/test/tools/javac/processing/model/TestSymtabItems.java	Tue Jul 05 16:37:24 2011 -0700
    43.3 @@ -23,7 +23,7 @@
    43.4  
    43.5  /*
    43.6   * @test
    43.7 - * @bug 7021183
    43.8 + * @bug 7021183 7025809
    43.9   * @summary 269: assertion failure getting enclosing element of an undefined name
   43.10   */
   43.11  
   43.12 @@ -37,9 +37,7 @@
   43.13  import javax.lang.model.element.VariableElement;
   43.14  import javax.lang.model.type.TypeMirror;
   43.15  import javax.lang.model.type.UnknownTypeException;
   43.16 -import javax.lang.model.util.ElementScanner7;
   43.17 -import javax.lang.model.util.SimpleTypeVisitor7;
   43.18 -import javax.lang.model.util.Types;
   43.19 +import javax.lang.model.util.*;
   43.20  
   43.21  import com.sun.tools.javac.code.Symbol.ClassSymbol;
   43.22  import com.sun.tools.javac.code.Symtab;
   43.23 @@ -112,7 +110,7 @@
   43.24  
   43.25      int errors;
   43.26  
   43.27 -    class ElemPrinter extends ElementScanner7<Void, Void> {
   43.28 +    class ElemPrinter extends ElementScanner8<Void, Void> {
   43.29          @Override
   43.30          public Void visitPackage(PackageElement e, Void p) {
   43.31              show("package", e);
    44.1 --- a/test/tools/javac/processing/model/element/TestMissingElement/TestMissingElement.java	Fri Jul 01 14:28:19 2011 -0700
    44.2 +++ b/test/tools/javac/processing/model/element/TestMissingElement/TestMissingElement.java	Tue Jul 05 16:37:24 2011 -0700
    44.3 @@ -24,7 +24,7 @@
    44.4  
    44.5  /*
    44.6   * @test
    44.7 - * @bug 6639645 7026414
    44.8 + * @bug 6639645 7026414 7025809
    44.9   * @summary Modeling type implementing missing interfaces
   44.10   * @library ../../../../lib
   44.11   * @build JavacTestingAbstractProcessor TestMissingElement
   44.12 @@ -104,7 +104,7 @@
   44.13      private String asString(TypeMirror t) {
   44.14          if (t == null)
   44.15              return "[typ:null]";
   44.16 -        return t.accept(new SimpleTypeVisitor7<String, Void>() {
   44.17 +        return t.accept(new SimpleTypeVisitor<String, Void>() {
   44.18              @Override
   44.19              public String defaultAction(TypeMirror t, Void ignore) {
   44.20                  return "[typ:" + t.toString() + "]";
   44.21 @@ -135,7 +135,7 @@
   44.22      private String asString(Element e) {
   44.23          if (e == null)
   44.24              return "[elt:null]";
   44.25 -        return e.accept(new SimpleElementVisitor7<String, Void>() {
   44.26 +        return e.accept(new SimpleElementVisitor<String, Void>() {
   44.27              @Override
   44.28              public String defaultAction(Element e, Void ignore) {
   44.29                  return "[elt:" + e.getKind() + " " + e.toString() + "]";
    45.1 --- a/test/tools/javac/processing/model/element/TestResourceVariable.java	Fri Jul 01 14:28:19 2011 -0700
    45.2 +++ b/test/tools/javac/processing/model/element/TestResourceVariable.java	Tue Jul 05 16:37:24 2011 -0700
    45.3 @@ -23,7 +23,7 @@
    45.4  
    45.5  /*
    45.6   * @test
    45.7 - * @bug  6911256 6964740 6967842 6961571
    45.8 + * @bug  6911256 6964740 6967842 6961571 7025809
    45.9   * @summary Test that the resource variable kind is appropriately set
   45.10   * @author  Joseph D. Darcy
   45.11   * @library ../../../lib
   45.12 @@ -44,8 +44,8 @@
   45.13  
   45.14  /**
   45.15   * Using the tree API, retrieve element representations of the
   45.16 - * resource of an ARM block and verify their kind tags are set
   45.17 - * appropriately.
   45.18 + * resource of a try-with-resources statement and verify their kind
   45.19 + * tags are set appropriately.
   45.20   */
   45.21  public class TestResourceVariable extends JavacTestingAbstractProcessor implements AutoCloseable {
   45.22      int resourceVariableCount = 0;
   45.23 @@ -82,7 +82,7 @@
   45.24  
   45.25      /**
   45.26       * Verify that a resource variable modeled as an element behaves
   45.27 -     * as expected under 6 and 7 specific visitors.
   45.28 +     * as expected under 6 and latest specific visitors.
   45.29       */
   45.30      private static void testResourceVariable(Element element) {
   45.31          ElementVisitor visitor6 = new ElementKindVisitor6<Void, Void>() {};
   45.32 @@ -94,7 +94,8 @@
   45.33              ; // Expected.
   45.34          }
   45.35  
   45.36 -        ElementKindVisitor7 visitor7 = new ElementKindVisitor7<Object, Void>() {
   45.37 +        ElementKindVisitor visitorLatest =
   45.38 +            new ElementKindVisitor<Object, Void>() {
   45.39              @Override
   45.40              public Object visitVariableAsResourceVariable(VariableElement e,
   45.41                                                            Void p) {
   45.42 @@ -102,7 +103,7 @@
   45.43              }
   45.44          };
   45.45  
   45.46 -        if (visitor7.visit(element) == null) {
   45.47 +        if (visitorLatest.visit(element) == null) {
   45.48              throw new RuntimeException("Null result of resource variable visitation.");
   45.49          }
   45.50      }
    46.1 --- a/test/tools/javac/processing/model/type/NoTypes.java	Fri Jul 01 14:28:19 2011 -0700
    46.2 +++ b/test/tools/javac/processing/model/type/NoTypes.java	Tue Jul 05 16:37:24 2011 -0700
    46.3 @@ -1,5 +1,5 @@
    46.4  /*
    46.5 - * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
    46.6 + * Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved.
    46.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    46.8   *
    46.9   * This code is free software; you can redistribute it and/or modify it
   46.10 @@ -23,7 +23,7 @@
   46.11  
   46.12  /*
   46.13   * @test
   46.14 - * @bug     6418666 6423973 6453386
   46.15 + * @bug     6418666 6423973 6453386 7025809
   46.16   * @summary Test the NoTypes: VOID, PACKAGE, NONE
   46.17   * @author  Scott Seligman
   46.18   * @library ../../../lib
   46.19 @@ -75,7 +75,7 @@
   46.20          verifyKind(NONE, types.getNoType(NONE));
   46.21  
   46.22          // The return type of a constructor or void method is VOID.
   46.23 -        class Scanner extends ElementScanner7<Void, Void> {
   46.24 +        class Scanner extends ElementScanner<Void, Void> {
   46.25              @Override
   46.26              public Void visitExecutable(ExecutableElement e, Void p) {
   46.27                  verifyKind(VOID, e.getReturnType());
   46.28 @@ -89,11 +89,11 @@
   46.29      }
   46.30  
   46.31      /**
   46.32 -     * Verify that a NoType instance is of a particular kind,
   46.33 -     * and that TypeKindVisitor7 properly dispatches on it.
   46.34 +     * Verify that a NoType instance is of a particular kind, and that
   46.35 +     * the latest TypeKindVisitor properly dispatches on it.
   46.36       */
   46.37      private void verifyKind(TypeKind kind, TypeMirror type) {
   46.38 -        class Vis extends TypeKindVisitor7<TypeKind, Void> {
   46.39 +        class Vis extends TypeKindVisitor<TypeKind, Void> {
   46.40              @Override
   46.41              public TypeKind visitNoTypeAsVoid(NoType t, Void p) {
   46.42                  return VOID;
   46.43 @@ -111,9 +111,7 @@
   46.44              throw new AssertionError();
   46.45      }
   46.46  
   46.47 -
   46.48      // Fodder for the tests
   46.49 -
   46.50      interface I {
   46.51      }
   46.52  
    47.1 --- a/test/tools/javac/processing/model/type/TestUnionType.java	Fri Jul 01 14:28:19 2011 -0700
    47.2 +++ b/test/tools/javac/processing/model/type/TestUnionType.java	Tue Jul 05 16:37:24 2011 -0700
    47.3 @@ -23,7 +23,7 @@
    47.4  
    47.5  /*
    47.6   * @test
    47.7 - * @bug     7029150
    47.8 + * @bug     7029150 7025809
    47.9   * @summary Test support for union types
   47.10   * @library ../../../lib
   47.11   */
   47.12 @@ -39,7 +39,6 @@
   47.13  import com.sun.source.tree.*;
   47.14  import com.sun.source.util.*;
   47.15  
   47.16 -
   47.17  public class TestUnionType extends JavacTestingAbstractProcessor {
   47.18      enum TestKind {
   47.19          SingleType("E1", "E1",
   47.20 @@ -194,7 +193,7 @@
   47.21          }
   47.22      }
   47.23  
   47.24 -    class TypePrinter extends SimpleTypeVisitor7<String, Void> {
   47.25 +    class TypePrinter extends SimpleTypeVisitor<String, Void> {
   47.26          @Override
   47.27          protected String defaultAction(TypeMirror tm, Void ignore) {
   47.28              return String.valueOf(tm.getKind());
    48.1 --- a/test/tools/javac/processing/model/util/deprecation/TestDeprecation.java	Fri Jul 01 14:28:19 2011 -0700
    48.2 +++ b/test/tools/javac/processing/model/util/deprecation/TestDeprecation.java	Tue Jul 05 16:37:24 2011 -0700
    48.3 @@ -1,5 +1,5 @@
    48.4  /*
    48.5 - * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
    48.6 + * Copyright (c) 2006, 2011 Oracle and/or its affiliates. All rights reserved.
    48.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    48.8   *
    48.9   * This code is free software; you can redistribute it and/or modify it
   48.10 @@ -68,7 +68,7 @@
   48.11          return true;
   48.12      }
   48.13  
   48.14 -    private class DeprecationChecker extends ElementScanner7<Boolean,Void> {
   48.15 +    private class DeprecationChecker extends ElementScanner<Boolean,Void> {
   48.16          private Elements elementUtils;
   48.17          private boolean failure;
   48.18          DeprecationChecker() {

mercurial