--- old/src/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java 2011-07-01 11:17:46.000000000 -0700 +++ new/src/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java 2011-07-01 11:17:46.000000000 -0700 @@ -720,7 +720,7 @@ * Leave class public for external testing purposes. */ public static class ComputeAnnotationSet extends - ElementScanner7, Set> { + ElementScanner8, Set> { final Elements elements; public ComputeAnnotationSet(Elements elements) { --- old/src/share/classes/com/sun/tools/javac/processing/JavacRoundEnvironment.java 2011-07-01 11:17:47.000000000 -0700 +++ new/src/share/classes/com/sun/tools/javac/processing/JavacRoundEnvironment.java 2011-07-01 11:17:47.000000000 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -125,7 +125,7 @@ else throw new AssertionError("Bad implementation type for " + tm); - ElementScanner7, DeclaredType> scanner = + ElementScanner8, DeclaredType> scanner = new AnnotationSetScanner(result, typeUtil); for (Element element : rootElements) @@ -136,7 +136,7 @@ // Could be written as a local class inside getElementsAnnotatedWith private class AnnotationSetScanner extends - ElementScanner7, DeclaredType> { + ElementScanner8, DeclaredType> { // Insertion-order preserving set Set annotatedElements = new LinkedHashSet(); Types typeUtil; --- old/src/share/classes/com/sun/tools/javac/processing/PrintingProcessor.java 2011-07-01 11:17:48.000000000 -0700 +++ new/src/share/classes/com/sun/tools/javac/processing/PrintingProcessor.java 2011-07-01 11:17:47.000000000 -0700 @@ -82,7 +82,7 @@ * Used for the -Xprint option and called by Elements.printElements */ public static class PrintingElementVisitor - extends SimpleElementVisitor7 { + extends SimpleElementVisitor8 { int indentation; // Indentation level; final PrintWriter writer; final Elements elementUtils; --- old/src/share/classes/com/sun/tools/javah/JavahTask.java 2011-07-01 11:17:48.000000000 -0700 +++ new/src/share/classes/com/sun/tools/javah/JavahTask.java 2011-07-01 11:17:48.000000000 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -60,7 +60,7 @@ import javax.lang.model.type.TypeMirror; import javax.lang.model.type.TypeVisitor; import javax.lang.model.util.ElementFilter; -import javax.lang.model.util.SimpleTypeVisitor7; +import javax.lang.model.util.SimpleTypeVisitor8; import javax.lang.model.util.Types; import javax.tools.Diagnostic; @@ -753,7 +753,7 @@ } private TypeVisitor checkMethodParametersVisitor = - new SimpleTypeVisitor7() { + new SimpleTypeVisitor8() { @Override public Void visitArray(ArrayType t, Types types) { visit(t.getComponentType(), types); --- old/src/share/classes/com/sun/tools/javah/LLNI.java 2011-07-01 11:17:49.000000000 -0700 +++ new/src/share/classes/com/sun/tools/javah/LLNI.java 2011-07-01 11:17:49.000000000 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -45,7 +45,7 @@ import javax.lang.model.type.TypeMirror; import javax.lang.model.type.TypeVisitor; import javax.lang.model.util.ElementFilter; -import javax.lang.model.util.SimpleTypeVisitor7; +import javax.lang.model.util.SimpleTypeVisitor8; /* *

This is NOT part of any supported API. @@ -628,7 +628,7 @@ } protected final boolean isLongOrDouble(TypeMirror t) { - TypeVisitor v = new SimpleTypeVisitor7() { + TypeVisitor v = new SimpleTypeVisitor8() { public Boolean defaultAction(TypeMirror t, Void p){ return false; } --- old/src/share/classes/com/sun/tools/javah/TypeSignature.java 2011-07-01 11:17:49.000000000 -0700 +++ new/src/share/classes/com/sun/tools/javah/TypeSignature.java 2011-07-01 11:17:49.000000000 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -38,7 +38,7 @@ import javax.lang.model.type.TypeVariable; import javax.lang.model.type.TypeVisitor; import javax.lang.model.util.Elements; -import javax.lang.model.util.SimpleTypeVisitor7; +import javax.lang.model.util.SimpleTypeVisitor8; /** * Returns internal type signature. @@ -245,7 +245,7 @@ String qualifiedTypeName(TypeMirror type) { - TypeVisitor v = new SimpleTypeVisitor7() { + TypeVisitor v = new SimpleTypeVisitor8() { @Override public Name visitArray(ArrayType t, Void p) { return t.getComponentType().accept(this, p); --- old/src/share/classes/javax/lang/model/util/AbstractAnnotationValueVisitor6.java 2011-07-01 11:17:50.000000000 -0700 +++ new/src/share/classes/javax/lang/model/util/AbstractAnnotationValueVisitor6.java 2011-07-01 11:17:50.000000000 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -64,6 +64,7 @@ * @author Peter von der Ahé * * @see AbstractAnnotationValueVisitor7 + * @see AbstractAnnotationValueVisitor8 * @since 1.6 */ @SupportedSourceVersion(RELEASE_6) --- old/src/share/classes/javax/lang/model/util/AbstractAnnotationValueVisitor7.java 2011-07-01 11:17:50.000000000 -0700 +++ new/src/share/classes/javax/lang/model/util/AbstractAnnotationValueVisitor7.java 2011-07-01 11:17:50.000000000 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2011 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -59,6 +59,7 @@ * @param

the type of the additional parameter to this visitor's methods. * * @see AbstractAnnotationValueVisitor6 + * @see AbstractAnnotationValueVisitor8 * @since 1.7 */ @SupportedSourceVersion(RELEASE_7) --- old/src/share/classes/javax/lang/model/util/AbstractElementVisitor6.java 2011-07-01 11:17:50.000000000 -0700 +++ new/src/share/classes/javax/lang/model/util/AbstractElementVisitor6.java 2011-07-01 11:17:50.000000000 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -67,6 +67,7 @@ * @author Peter von der Ahé * * @see AbstractElementVisitor7 + * @see AbstractElementVisitor8 * @since 1.6 */ @SupportedSourceVersion(RELEASE_6) --- old/src/share/classes/javax/lang/model/util/AbstractElementVisitor7.java 2011-07-01 11:17:51.000000000 -0700 +++ new/src/share/classes/javax/lang/model/util/AbstractElementVisitor7.java 2011-07-01 11:17:51.000000000 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -62,6 +62,7 @@ * additional parameter. * * @see AbstractElementVisitor6 + * @see AbstractElementVisitor8 * @since 1.7 */ @SupportedSourceVersion(RELEASE_7) --- old/src/share/classes/javax/lang/model/util/AbstractTypeVisitor6.java 2011-07-01 11:17:51.000000000 -0700 +++ new/src/share/classes/javax/lang/model/util/AbstractTypeVisitor6.java 2011-07-01 11:17:51.000000000 -0700 @@ -60,6 +60,7 @@ * @author Peter von der Ahé * * @see AbstractTypeVisitor7 + * @see AbstractTypeVisitor8 * @since 1.6 */ public abstract class AbstractTypeVisitor6 implements TypeVisitor { --- old/src/share/classes/javax/lang/model/util/AbstractTypeVisitor7.java 2011-07-01 11:17:52.000000000 -0700 +++ new/src/share/classes/javax/lang/model/util/AbstractTypeVisitor7.java 2011-07-01 11:17:52.000000000 -0700 @@ -56,6 +56,7 @@ * additional parameter. * * @see AbstractTypeVisitor6 + * @see AbstractTypeVisitor8 * @since 1.7 */ public abstract class AbstractTypeVisitor7 extends AbstractTypeVisitor6 { --- old/src/share/classes/javax/lang/model/util/ElementKindVisitor6.java 2011-07-01 11:17:52.000000000 -0700 +++ new/src/share/classes/javax/lang/model/util/ElementKindVisitor6.java 2011-07-01 11:17:52.000000000 -0700 @@ -78,6 +78,7 @@ * @author Peter von der Ahé * * @see ElementKindVisitor7 + * @see ElementKindVisitor8 * @since 1.6 */ @SupportedSourceVersion(RELEASE_6) --- old/src/share/classes/javax/lang/model/util/ElementKindVisitor7.java 2011-07-01 11:17:53.000000000 -0700 +++ new/src/share/classes/javax/lang/model/util/ElementKindVisitor7.java 2011-07-01 11:17:52.000000000 -0700 @@ -73,6 +73,7 @@ * additional parameter. * * @see ElementKindVisitor6 + * @see ElementKindVisitor8 * @since 1.7 */ @SupportedSourceVersion(RELEASE_7) --- old/src/share/classes/javax/lang/model/util/ElementScanner6.java 2011-07-01 11:17:53.000000000 -0700 +++ new/src/share/classes/javax/lang/model/util/ElementScanner6.java 2011-07-01 11:17:53.000000000 -0700 @@ -90,6 +90,7 @@ * @author Peter von der Ahé * * @see ElementScanner7 + * @see ElementScanner8 * @since 1.6 */ @SupportedSourceVersion(RELEASE_6) --- old/src/share/classes/javax/lang/model/util/ElementScanner7.java 2011-07-01 11:17:53.000000000 -0700 +++ new/src/share/classes/javax/lang/model/util/ElementScanner7.java 2011-07-01 11:17:53.000000000 -0700 @@ -86,6 +86,7 @@ * additional parameter. * * @see ElementScanner6 + * @see ElementScanner8 * @since 1.7 */ @SupportedSourceVersion(RELEASE_7) --- old/src/share/classes/javax/lang/model/util/SimpleAnnotationValueVisitor6.java 2011-07-01 11:17:54.000000000 -0700 +++ new/src/share/classes/javax/lang/model/util/SimpleAnnotationValueVisitor6.java 2011-07-01 11:17:54.000000000 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -71,6 +71,7 @@ * @author Peter von der Ahé * * @see SimpleAnnotationValueVisitor7 + * @see SimpleAnnotationValueVisitor8 * @since 1.6 */ @SupportedSourceVersion(RELEASE_6) --- old/src/share/classes/javax/lang/model/util/SimpleAnnotationValueVisitor7.java 2011-07-01 11:17:54.000000000 -0700 +++ new/src/share/classes/javax/lang/model/util/SimpleAnnotationValueVisitor7.java 2011-07-01 11:17:54.000000000 -0700 @@ -66,6 +66,7 @@ * @param

the type of the additional parameter to this visitor's methods. * * @see SimpleAnnotationValueVisitor6 + * @see SimpleAnnotationValueVisitor8 * @since 1.7 */ @SupportedSourceVersion(RELEASE_7) --- old/src/share/classes/javax/lang/model/util/SimpleElementVisitor6.java 2011-07-01 11:17:55.000000000 -0700 +++ new/src/share/classes/javax/lang/model/util/SimpleElementVisitor6.java 2011-07-01 11:17:55.000000000 -0700 @@ -76,6 +76,7 @@ * @author Peter von der Ahé * * @see SimpleElementVisitor7 + * @see SimpleElementVisitor8 * @since 1.6 */ @SupportedSourceVersion(RELEASE_6) --- old/src/share/classes/javax/lang/model/util/SimpleElementVisitor7.java 2011-07-01 11:17:55.000000000 -0700 +++ new/src/share/classes/javax/lang/model/util/SimpleElementVisitor7.java 2011-07-01 11:17:55.000000000 -0700 @@ -69,6 +69,7 @@ * for visitors that do not need an additional parameter. * * @see SimpleElementVisitor6 + * @see SimpleElementVisitor8 * @since 1.7 */ @SupportedSourceVersion(RELEASE_7) --- old/src/share/classes/javax/lang/model/util/SimpleTypeVisitor6.java 2011-07-01 11:17:55.000000000 -0700 +++ new/src/share/classes/javax/lang/model/util/SimpleTypeVisitor6.java 2011-07-01 11:17:55.000000000 -0700 @@ -75,6 +75,7 @@ * @author Peter von der Ahé * * @see SimpleTypeVisitor7 + * @see SimpleTypeVisitor8 * @since 1.6 */ @SupportedSourceVersion(RELEASE_6) --- old/src/share/classes/javax/lang/model/util/SimpleTypeVisitor7.java 2011-07-01 11:17:56.000000000 -0700 +++ new/src/share/classes/javax/lang/model/util/SimpleTypeVisitor7.java 2011-07-01 11:17:56.000000000 -0700 @@ -68,6 +68,7 @@ * additional parameter. * * @see SimpleTypeVisitor6 + * @see SimpleTypeVisitor8 * @since 1.7 */ @SupportedSourceVersion(RELEASE_7) --- old/src/share/classes/javax/lang/model/util/TypeKindVisitor6.java 2011-07-01 11:17:56.000000000 -0700 +++ new/src/share/classes/javax/lang/model/util/TypeKindVisitor6.java 2011-07-01 11:17:56.000000000 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -76,6 +76,7 @@ * @author Peter von der Ahé * * @see TypeKindVisitor7 + * @see TypeKindVisitor8 * @since 1.6 */ @SupportedSourceVersion(RELEASE_6) --- old/src/share/classes/javax/lang/model/util/TypeKindVisitor7.java 2011-07-01 11:17:57.000000000 -0700 +++ new/src/share/classes/javax/lang/model/util/TypeKindVisitor7.java 2011-07-01 11:17:56.000000000 -0700 @@ -71,6 +71,7 @@ * additional parameter. * * @see TypeKindVisitor6 + * @see TypeKindVisitor8 * @since 1.7 */ @SupportedSourceVersion(RELEASE_7) --- old/src/share/sample/javac/processing/src/CheckNamesProcessor.java 2011-07-01 11:17:57.000000000 -0700 +++ new/src/share/sample/javac/processing/src/CheckNamesProcessor.java 2011-07-01 11:17:57.000000000 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -138,7 +138,7 @@ public SourceVersion getSupportedSourceVersion() { /* * Return latest source version instead of a fixed version - * like RELEASE_7. To return a fixed version, this class + * like RELEASE_8. To return a fixed version, this class * could be annotated with a SupportedSourceVersion * annotation. * @@ -192,7 +192,7 @@ /** * Visitor to implement name checks. */ - private class NameCheckScanner extends ElementScanner7 { + private class NameCheckScanner extends ElementScanner8 { // The visitor could be enhanced to return true/false if // there were warnings reported or a count of the number // of warnings. This could be facilitated by using --- old/test/tools/javac/6402516/CheckLocalElements.java 2011-07-01 11:17:57.000000000 -0700 +++ new/test/tools/javac/6402516/CheckLocalElements.java 2011-07-01 11:17:57.000000000 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -95,7 +95,7 @@ return encl == null ? "" : encl.accept(qualNameVisitor, null); } - private ElementVisitor qualNameVisitor = new SimpleElementVisitor7() { + private ElementVisitor qualNameVisitor = new SimpleElementVisitor8() { protected String defaultAction(Element e, Void ignore) { return ""; } --- old/test/tools/javac/api/TestOperators.java 2011-07-01 11:17:58.000000000 -0700 +++ new/test/tools/javac/api/TestOperators.java 2011-07-01 11:17:58.000000000 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -26,7 +26,8 @@ * @bug 6338064 6346249 6340951 6392177 * @summary Tree API: can't determine kind of operator * @author Peter von der Ah\u00e9 - * @compile TestOperators.java + * @library ../lib + * @build JavacTestingAbstractProcessor TestOperators * @compile -processor TestOperators -proc:only TestOperators.java */ @@ -46,7 +47,7 @@ } @SupportedAnnotationTypes("TestMe") -public class TestOperators extends AbstractProcessor { +public class TestOperators extends JavacTestingAbstractProcessor { @TestMe(POSTFIX_INCREMENT) public int test_POSTFIX_INCREMENT(int i) { @@ -299,7 +300,7 @@ final Trees trees = Trees.instance(processingEnv); final Messager log = processingEnv.getMessager(); final Elements elements = processingEnv.getElementUtils(); - class Scan extends ElementScanner7 { + class Scan extends ElementScanner { @Override public Void visitExecutable(ExecutableElement e, Void p) { Object debug = e; // info for exception handler @@ -343,5 +344,4 @@ } return true; } - } --- old/test/tools/javac/enum/6350057/T6350057.java 2011-07-01 11:17:58.000000000 -0700 +++ new/test/tools/javac/enum/6350057/T6350057.java 2011-07-01 11:17:58.000000000 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,10 +23,11 @@ /* * @test - * @bug 6350057 + * @bug 6350057 7025809 * @summary Test that parameters on implicit enum methods have the right kind * @author Joseph D. Darcy - * @compile T6350057.java + * @library ../../lib + * @build JavacTestingAbstractProcessor T6350057 * @compile -processor T6350057 -proc:only TestEnum.java */ @@ -38,9 +39,8 @@ import javax.lang.model.util.*; import static javax.tools.Diagnostic.Kind.*; -@SupportedAnnotationTypes("*") -public class T6350057 extends AbstractProcessor { - static class LocalVarAllergy extends ElementKindVisitor6 { +public class T6350057 extends JavacTestingAbstractProcessor { + static class LocalVarAllergy extends ElementKindVisitor { @Override public Boolean visitTypeAsEnum(TypeElement e, Void v) { System.out.println("visitTypeAsEnum: " + e.getSimpleName().toString()); --- old/test/tools/javac/enum/6424358/T6424358.java 2011-07-01 11:17:59.000000000 -0700 +++ new/test/tools/javac/enum/6424358/T6424358.java 2011-07-01 11:17:59.000000000 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,10 +23,11 @@ /* * @test - * @bug 6424358 + * @bug 6424358 7025809 * @summary Synthesized static enum method values() is final * @author Peter von der Ah\u00e9 - * @compile T6424358.java + * @library ../../lib + * @build JavacTestingAbstractProcessor T6424358 * @compile -processor T6424358 -proc:only T6424358.java */ @@ -39,8 +40,7 @@ @interface TestMe {} -@SupportedAnnotationTypes("*") -public class T6424358 extends AbstractProcessor { +public class T6424358 extends JavacTestingAbstractProcessor { @TestMe enum Test { FOO; } public boolean process(Set annotations, @@ -48,7 +48,7 @@ final Messager log = processingEnv.getMessager(); final Elements elements = processingEnv.getElementUtils(); final TypeElement testMe = elements.getTypeElement("TestMe"); - class Scan extends ElementScanner7 { + class Scan extends ElementScanner { @Override public Void visitExecutable(ExecutableElement e, Void p) { System.err.println("Looking at " + e); @@ -65,9 +65,4 @@ scan.scan(e); return true; } - - @Override - public SourceVersion getSupportedSourceVersion() { - return SourceVersion.latest(); - } } --- old/test/tools/javac/failover/FailOver15.out 2011-07-01 11:17:59.000000000 -0700 +++ new/test/tools/javac/failover/FailOver15.out 2011-07-01 11:17:59.000000000 -0700 @@ -1,4 +1,3 @@ FailOver15.java:17:10: compiler.err.expected: ';' FailOver15.java:11:13: compiler.err.cant.resolve.location: kindname.class, UnknownClass, , , (compiler.misc.location: kindname.class, Test, null) 2 errors - --- old/test/tools/javac/lib/JavacTestingAbstractProcessor.java 2011-07-01 11:18:00.000000000 -0700 +++ new/test/tools/javac/lib/JavacTestingAbstractProcessor.java 2011-07-01 11:17:59.000000000 -0700 @@ -25,6 +25,7 @@ import javax.annotation.processing.*; import javax.lang.model.SourceVersion; import javax.lang.model.util.*; +import static javax.lang.model.SourceVersion.*; /** * An abstract annotation processor tailored to javac regression testing. @@ -95,4 +96,164 @@ messager = processingEnv.getMessager(); options = processingEnv.getOptions(); } + + /* + * The set of "" utility visitors below will directly extend + * the most recent corresponding platform visitor type. + */ + + @SupportedSourceVersion(RELEASE_8) + public static abstract class AbstractAnnotationValueVisitor extends AbstractAnnotationValueVisitor8 { + + /** + * Constructor for concrete subclasses to call. + */ + protected AbstractAnnotationValueVisitor() { + super(); + } + } + + @SupportedSourceVersion(RELEASE_8) + public static abstract class AbstractElementVisitor extends AbstractElementVisitor8 { + /** + * Constructor for concrete subclasses to call. + */ + protected AbstractElementVisitor(){ + super(); + } + } + + @SupportedSourceVersion(RELEASE_8) + public static abstract class AbstractTypeVisitor extends AbstractTypeVisitor8 { + /** + * Constructor for concrete subclasses to call. + */ + protected AbstractTypeVisitor() { + super(); + } + } + + @SupportedSourceVersion(RELEASE_8) + public static class ElementKindVisitor extends ElementKindVisitor8 { + /** + * Constructor for concrete subclasses; uses {@code null} for the + * default value. + */ + protected ElementKindVisitor() { + super(null); + } + + /** + * Constructor for concrete subclasses; uses the argument for the + * default value. + * + * @param defaultValue the value to assign to {@link #DEFAULT_VALUE} + */ + protected ElementKindVisitor(R defaultValue) { + super(defaultValue); + } + } + + @SupportedSourceVersion(RELEASE_8) + public static class ElementScanner extends ElementScanner8 { + /** + * Constructor for concrete subclasses; uses {@code null} for the + * default value. + */ + protected ElementScanner(){ + super(null); + } + + /** + * Constructor for concrete subclasses; uses the argument for the + * default value. + */ + protected ElementScanner(R defaultValue){ + super(defaultValue); + } + } + + @SupportedSourceVersion(RELEASE_8) + public static class SimpleAnnotationValueVisitor extends SimpleAnnotationValueVisitor8 { + /** + * Constructor for concrete subclasses; uses {@code null} for the + * default value. + */ + protected SimpleAnnotationValueVisitor() { + super(null); + } + + /** + * Constructor for concrete subclasses; uses the argument for the + * default value. + * + * @param defaultValue the value to assign to {@link #DEFAULT_VALUE} + */ + protected SimpleAnnotationValueVisitor(R defaultValue) { + super(defaultValue); + } + } + + @SupportedSourceVersion(RELEASE_8) + public static class SimpleElementVisitor extends SimpleElementVisitor8 { + /** + * Constructor for concrete subclasses; uses {@code null} for the + * default value. + */ + protected SimpleElementVisitor(){ + super(null); + } + + /** + * Constructor for concrete subclasses; uses the argument for the + * default value. + * + * @param defaultValue the value to assign to {@link #DEFAULT_VALUE} + */ + protected SimpleElementVisitor(R defaultValue){ + super(defaultValue); + } + } + + @SupportedSourceVersion(RELEASE_8) + public static class SimpleTypeVisitor extends SimpleTypeVisitor8 { + /** + * Constructor for concrete subclasses; uses {@code null} for the + * default value. + */ + protected SimpleTypeVisitor(){ + super(null); + } + + /** + * Constructor for concrete subclasses; uses the argument for the + * default value. + * + * @param defaultValue the value to assign to {@link #DEFAULT_VALUE} + */ + protected SimpleTypeVisitor(R defaultValue){ + super(defaultValue); + } + } + + @SupportedSourceVersion(RELEASE_8) + public static class TypeKindVisitor extends TypeKindVisitor8 { + /** + * Constructor for concrete subclasses to call; uses {@code null} + * for the default value. + */ + protected TypeKindVisitor() { + super(null); + } + + /** + * Constructor for concrete subclasses to call; uses the argument + * for the default value. + * + * @param defaultValue the value to assign to {@link #DEFAULT_VALUE} + */ + protected TypeKindVisitor(R defaultValue) { + super(defaultValue); + } + } } --- old/test/tools/javac/multicatch/model/ModelChecker.java 2011-07-01 11:18:00.000000000 -0700 +++ new/test/tools/javac/multicatch/model/ModelChecker.java 2011-07-01 11:18:00.000000000 -0700 @@ -23,7 +23,7 @@ /* * @test - * @bug 6993963 + * @bug 6993963 7025809 * @summary Project Coin: Use precise exception analysis for effectively final catch parameters * @library ../../lib * @build JavacTestingAbstractProcessor ModelChecker @@ -107,7 +107,7 @@ ; // Expected } - UnionType unionType = new SimpleTypeVisitor7(){ + UnionType unionType = new SimpleTypeVisitor(){ @Override protected UnionType defaultAction(TypeMirror e, Void p) {return null;} --- old/test/tools/javac/processing/model/6194785/T6194785.java 2011-07-01 11:18:00.000000000 -0700 +++ new/test/tools/javac/processing/model/6194785/T6194785.java 2011-07-01 11:18:00.000000000 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -21,7 +21,7 @@ * questions. */ -/** +/* * @test * @bug 6194785 * @summary ParameterDeclaration.getSimpleName does not return actual name from class files @@ -40,9 +40,8 @@ public class T6194785 extends JavacTestingAbstractProcessor { public boolean process(Set annotations, - RoundEnvironment roundEnvironment) - { - class Scan extends ElementScanner7 { + RoundEnvironment roundEnvironment) { + class Scan extends ElementScanner { @Override public Void visitExecutable(ExecutableElement e, Void ignored) { for (VariableElement p : e.getParameters()) --- old/test/tools/javac/processing/model/TestSymtabItems.java 2011-07-01 11:18:01.000000000 -0700 +++ new/test/tools/javac/processing/model/TestSymtabItems.java 2011-07-01 11:18:01.000000000 -0700 @@ -23,7 +23,7 @@ /* * @test - * @bug 7021183 + * @bug 7021183 7025809 * @summary 269: assertion failure getting enclosing element of an undefined name */ @@ -37,9 +37,7 @@ import javax.lang.model.element.VariableElement; import javax.lang.model.type.TypeMirror; import javax.lang.model.type.UnknownTypeException; -import javax.lang.model.util.ElementScanner7; -import javax.lang.model.util.SimpleTypeVisitor7; -import javax.lang.model.util.Types; +import javax.lang.model.util.*; import com.sun.tools.javac.code.Symbol.ClassSymbol; import com.sun.tools.javac.code.Symtab; @@ -112,7 +110,7 @@ int errors; - class ElemPrinter extends ElementScanner7 { + class ElemPrinter extends ElementScanner8 { @Override public Void visitPackage(PackageElement e, Void p) { show("package", e); --- old/test/tools/javac/processing/model/element/TestMissingElement/TestMissingElement.java 2011-07-01 11:18:01.000000000 -0700 +++ new/test/tools/javac/processing/model/element/TestMissingElement/TestMissingElement.java 2011-07-01 11:18:01.000000000 -0700 @@ -24,7 +24,7 @@ /* * @test - * @bug 6639645 7026414 + * @bug 6639645 7026414 7025809 * @summary Modeling type implementing missing interfaces * @library ../../../../lib * @build JavacTestingAbstractProcessor TestMissingElement @@ -104,7 +104,7 @@ private String asString(TypeMirror t) { if (t == null) return "[typ:null]"; - return t.accept(new SimpleTypeVisitor7() { + return t.accept(new SimpleTypeVisitor() { @Override public String defaultAction(TypeMirror t, Void ignore) { return "[typ:" + t.toString() + "]"; @@ -135,7 +135,7 @@ private String asString(Element e) { if (e == null) return "[elt:null]"; - return e.accept(new SimpleElementVisitor7() { + return e.accept(new SimpleElementVisitor() { @Override public String defaultAction(Element e, Void ignore) { return "[elt:" + e.getKind() + " " + e.toString() + "]"; --- old/test/tools/javac/processing/model/element/TestResourceVariable.java 2011-07-01 11:18:02.000000000 -0700 +++ new/test/tools/javac/processing/model/element/TestResourceVariable.java 2011-07-01 11:18:01.000000000 -0700 @@ -23,7 +23,7 @@ /* * @test - * @bug 6911256 6964740 6967842 6961571 + * @bug 6911256 6964740 6967842 6961571 7025809 * @summary Test that the resource variable kind is appropriately set * @author Joseph D. Darcy * @library ../../../lib @@ -44,8 +44,8 @@ /** * Using the tree API, retrieve element representations of the - * resource of an ARM block and verify their kind tags are set - * appropriately. + * resource of a try-with-resources statement and verify their kind + * tags are set appropriately. */ public class TestResourceVariable extends JavacTestingAbstractProcessor implements AutoCloseable { int resourceVariableCount = 0; @@ -82,7 +82,7 @@ /** * Verify that a resource variable modeled as an element behaves - * as expected under 6 and 7 specific visitors. + * as expected under 6 and latest specific visitors. */ private static void testResourceVariable(Element element) { ElementVisitor visitor6 = new ElementKindVisitor6() {}; @@ -94,7 +94,8 @@ ; // Expected. } - ElementKindVisitor7 visitor7 = new ElementKindVisitor7() { + ElementKindVisitor visitorLatest = + new ElementKindVisitor() { @Override public Object visitVariableAsResourceVariable(VariableElement e, Void p) { @@ -102,7 +103,7 @@ } }; - if (visitor7.visit(element) == null) { + if (visitorLatest.visit(element) == null) { throw new RuntimeException("Null result of resource variable visitation."); } } --- old/test/tools/javac/processing/model/type/NoTypes.java 2011-07-01 11:18:02.000000000 -0700 +++ new/test/tools/javac/processing/model/type/NoTypes.java 2011-07-01 11:18:02.000000000 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,7 +23,7 @@ /* * @test - * @bug 6418666 6423973 6453386 + * @bug 6418666 6423973 6453386 7025809 * @summary Test the NoTypes: VOID, PACKAGE, NONE * @author Scott Seligman * @library ../../../lib @@ -75,7 +75,7 @@ verifyKind(NONE, types.getNoType(NONE)); // The return type of a constructor or void method is VOID. - class Scanner extends ElementScanner7 { + class Scanner extends ElementScanner { @Override public Void visitExecutable(ExecutableElement e, Void p) { verifyKind(VOID, e.getReturnType()); @@ -89,11 +89,11 @@ } /** - * Verify that a NoType instance is of a particular kind, - * and that TypeKindVisitor7 properly dispatches on it. + * Verify that a NoType instance is of a particular kind, and that + * the latest TypeKindVisitor properly dispatches on it. */ private void verifyKind(TypeKind kind, TypeMirror type) { - class Vis extends TypeKindVisitor7 { + class Vis extends TypeKindVisitor { @Override public TypeKind visitNoTypeAsVoid(NoType t, Void p) { return VOID; @@ -111,9 +111,7 @@ throw new AssertionError(); } - // Fodder for the tests - interface I { } --- old/test/tools/javac/processing/model/type/TestUnionType.java 2011-07-01 11:18:02.000000000 -0700 +++ new/test/tools/javac/processing/model/type/TestUnionType.java 2011-07-01 11:18:02.000000000 -0700 @@ -23,7 +23,7 @@ /* * @test - * @bug 7029150 + * @bug 7029150 7025809 * @summary Test support for union types * @library ../../../lib */ @@ -39,7 +39,6 @@ import com.sun.source.tree.*; import com.sun.source.util.*; - public class TestUnionType extends JavacTestingAbstractProcessor { enum TestKind { SingleType("E1", "E1", @@ -194,7 +193,7 @@ } } - class TypePrinter extends SimpleTypeVisitor7 { + class TypePrinter extends SimpleTypeVisitor { @Override protected String defaultAction(TypeMirror tm, Void ignore) { return String.valueOf(tm.getKind()); --- old/test/tools/javac/processing/model/util/deprecation/TestDeprecation.java 2011-07-01 11:18:03.000000000 -0700 +++ new/test/tools/javac/processing/model/util/deprecation/TestDeprecation.java 2011-07-01 11:18:03.000000000 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 2011 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -68,7 +68,7 @@ return true; } - private class DeprecationChecker extends ElementScanner7 { + private class DeprecationChecker extends ElementScanner { private Elements elementUtils; private boolean failure; DeprecationChecker() { --- /dev/null 2011-06-27 07:41:23.137649133 -0700 +++ new/src/share/classes/javax/lang/model/util/AbstractAnnotationValueVisitor8.java 2011-07-01 11:18:03.000000000 -0700 @@ -0,0 +1,74 @@ +/* + * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package javax.lang.model.util; + +import java.util.List; +import javax.lang.model.element.*; + +import javax.lang.model.type.TypeMirror; +import static javax.lang.model.SourceVersion.*; +import javax.lang.model.SourceVersion; +import javax.annotation.processing.SupportedSourceVersion; + +/** + * A skeletal visitor for annotation values with default behavior + * appropriate for the {@link SourceVersion#RELEASE_8 RELEASE_8} + * source version. + * + *

WARNING: The {@code AnnotationValueVisitor} interface + * implemented by this class may have methods added to it in the + * future to accommodate new, currently unknown, language structures + * added to future versions of the Java™ programming language. + * Therefore, methods whose names begin with {@code "visit"} may be + * added to this class in the future; to avoid incompatibilities, + * classes which extend this class should not declare any instance + * methods with names beginning with {@code "visit"}. + * + *

When such a new visit method is added, the default + * implementation in this class will be to call the {@link + * #visitUnknown visitUnknown} method. A new abstract annotation + * value visitor class will also be introduced to correspond to the + * new language level; this visitor will have different default + * behavior for the visit method in question. When the new visitor is + * introduced, all or portions of this visitor may be deprecated. + * + * @param the return type of this visitor's methods + * @param

the type of the additional parameter to this visitor's methods. + * + * @see AbstractAnnotationValueVisitor6 + * @see AbstractAnnotationValueVisitor7 + * @since 1.8 + */ +@SupportedSourceVersion(RELEASE_8) +public abstract class AbstractAnnotationValueVisitor8 extends AbstractAnnotationValueVisitor7 { + + /** + * Constructor for concrete subclasses to call. + */ + protected AbstractAnnotationValueVisitor8() { + super(); + } +} --- /dev/null 2011-06-27 07:41:23.137649133 -0700 +++ new/src/share/classes/javax/lang/model/util/AbstractElementVisitor8.java 2011-07-01 11:18:03.000000000 -0700 @@ -0,0 +1,76 @@ +/* + * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package javax.lang.model.util; + +import javax.lang.model.element.*; +import javax.annotation.processing.SupportedSourceVersion; +import javax.lang.model.element.*; +import static javax.lang.model.element.ElementKind.*; +import static javax.lang.model.SourceVersion.*; +import javax.lang.model.SourceVersion; + + +/** + * A skeletal visitor of program elements with default behavior + * appropriate for the {@link SourceVersion#RELEASE_8 RELEASE_8} + * source version. + * + *

WARNING: The {@code ElementVisitor} interface + * implemented by this class may have methods added to it in the + * future to accommodate new, currently unknown, language structures + * added to future versions of the Java™ programming language. + * Therefore, methods whose names begin with {@code "visit"} may be + * added to this class in the future; to avoid incompatibilities, + * classes which extend this class should not declare any instance + * methods with names beginning with {@code "visit"}. + * + *

When such a new visit method is added, the default + * implementation in this class will be to call the {@link + * #visitUnknown visitUnknown} method. A new abstract element visitor + * class will also be introduced to correspond to the new language + * level; this visitor will have different default behavior for the + * visit method in question. When the new visitor is introduced, all + * or portions of this visitor may be deprecated. + * + * @param the return type of this visitor's methods. Use {@link + * Void} for visitors that do not need to return results. + * @param

the type of the additional parameter to this visitor's + * methods. Use {@code Void} for visitors that do not need an + * additional parameter. + * + * @see AbstractElementVisitor6 + * @see AbstractElementVisitor7 + * @since 1.8 + */ +@SupportedSourceVersion(RELEASE_8) +public abstract class AbstractElementVisitor8 extends AbstractElementVisitor7 { + /** + * Constructor for concrete subclasses to call. + */ + protected AbstractElementVisitor8(){ + super(); + } +} --- /dev/null 2011-06-27 07:41:23.137649133 -0700 +++ new/src/share/classes/javax/lang/model/util/AbstractTypeVisitor8.java 2011-07-01 11:18:04.000000000 -0700 @@ -0,0 +1,69 @@ +/* + * Copyright (c) 2011 Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package javax.lang.model.util; + +import javax.lang.model.type.*; + +/** + * A skeletal visitor of types with default behavior appropriate for + * the {@link javax.lang.model.SourceVersion#RELEASE_8 RELEASE_8} + * source version. + * + *

WARNING: The {@code TypeVisitor} interface implemented + * by this class may have methods added to it in the future to + * accommodate new, currently unknown, language structures added to + * future versions of the Java™ programming language. + * Therefore, methods whose names begin with {@code "visit"} may be + * added to this class in the future; to avoid incompatibilities, + * classes which extend this class should not declare any instance + * methods with names beginning with {@code "visit"}. + * + *

When such a new visit method is added, the default + * implementation in this class will be to call the {@link + * #visitUnknown visitUnknown} method. A new abstract type visitor + * class will also be introduced to correspond to the new language + * level; this visitor will have different default behavior for the + * visit method in question. When the new visitor is introduced, all + * or portions of this visitor may be deprecated. + * + * @param the return type of this visitor's methods. Use {@link + * Void} for visitors that do not need to return results. + * @param

the type of the additional parameter to this visitor's + * methods. Use {@code Void} for visitors that do not need an + * additional parameter. + * + * @see AbstractTypeVisitor6 + * @see AbstractTypeVisitor7 + * @since 1.8 + */ +public abstract class AbstractTypeVisitor8 extends AbstractTypeVisitor7 { + /** + * Constructor for concrete subclasses to call. + */ + protected AbstractTypeVisitor8() { + super(); + } +} --- /dev/null 2011-06-27 07:41:23.137649133 -0700 +++ new/src/share/classes/javax/lang/model/util/ElementKindVisitor8.java 2011-07-01 11:18:04.000000000 -0700 @@ -0,0 +1,98 @@ +/* + * Copyright (c) 2011 Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package javax.lang.model.util; + +import javax.lang.model.element.*; +import static javax.lang.model.element.ElementKind.*; +import javax.annotation.processing.SupportedSourceVersion; +import static javax.lang.model.SourceVersion.*; +import javax.lang.model.SourceVersion; + +/** + * A visitor of program elements based on their {@linkplain + * ElementKind kind} with default behavior appropriate for the {@link + * SourceVersion#RELEASE_8 RELEASE_8} source version. For {@linkplain + * Element elements} XYZ that may have more than one + * kind, the visitXYZ methods in this class delegate + * to the visitXYZKind method corresponding to the + * first argument's kind. The visitXYZKind methods + * call {@link #defaultAction defaultAction}, passing their arguments + * to {@code defaultAction}'s corresponding parameters. + * + *

Methods in this class may be overridden subject to their + * general contract. Note that annotating methods in concrete + * subclasses with {@link java.lang.Override @Override} will help + * ensure that methods are overridden as intended. + * + *

WARNING: The {@code ElementVisitor} interface + * implemented by this class may have methods added to it or the + * {@code ElementKind} {@code enum} used in this case may have + * constants added to it in the future to accommodate new, currently + * unknown, language structures added to future versions of the + * Java™ programming language. Therefore, methods whose names + * begin with {@code "visit"} may be added to this class in the + * future; to avoid incompatibilities, classes which extend this class + * should not declare any instance methods with names beginning with + * {@code "visit"}. + * + *

When such a new visit method is added, the default + * implementation in this class will be to call the {@link + * #visitUnknown visitUnknown} method. A new abstract element kind + * visitor class will also be introduced to correspond to the new + * language level; this visitor will have different default behavior + * for the visit method in question. When the new visitor is + * introduced, all or portions of this visitor may be deprecated. + * + * @param the return type of this visitor's methods. Use {@link + * Void} for visitors that do not need to return results. + * @param

the type of the additional parameter to this visitor's + * methods. Use {@code Void} for visitors that do not need an + * additional parameter. + * + * @see ElementKindVisitor6 + * @see ElementKindVisitor7 + * @since 1.8 + */ +@SupportedSourceVersion(RELEASE_8) +public class ElementKindVisitor8 extends ElementKindVisitor7 { + /** + * Constructor for concrete subclasses; uses {@code null} for the + * default value. + */ + protected ElementKindVisitor8() { + super(null); + } + + /** + * Constructor for concrete subclasses; uses the argument for the + * default value. + * + * @param defaultValue the value to assign to {@link #DEFAULT_VALUE} + */ + protected ElementKindVisitor8(R defaultValue) { + super(defaultValue); + } +} --- /dev/null 2011-06-27 07:41:23.137649133 -0700 +++ new/src/share/classes/javax/lang/model/util/ElementScanner8.java 2011-07-01 11:18:05.000000000 -0700 @@ -0,0 +1,109 @@ +/* + * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package javax.lang.model.util; + +import javax.lang.model.element.*; +import javax.annotation.processing.SupportedSourceVersion; +import static javax.lang.model.element.ElementKind.*; +import javax.lang.model.SourceVersion; +import static javax.lang.model.SourceVersion.*; + + +/** + * A scanning visitor of program elements with default behavior + * appropriate for the {@link SourceVersion#RELEASE_8 RELEASE_8} + * source version. The visitXYZ methods in this + * class scan their component elements by calling {@code scan} on + * their {@linkplain Element#getEnclosedElements enclosed elements}, + * {@linkplain ExecutableElement#getParameters parameters}, etc., as + * indicated in the individual method specifications. A subclass can + * control the order elements are visited by overriding the + * visitXYZ methods. Note that clients of a scanner + * may get the desired behavior be invoking {@code v.scan(e, p)} rather + * than {@code v.visit(e, p)} on the root objects of interest. + * + *

When a subclass overrides a visitXYZ method, the + * new method can cause the enclosed elements to be scanned in the + * default way by calling super.visitXYZ. In this + * fashion, the concrete visitor can control the ordering of traversal + * over the component elements with respect to the additional + * processing; for example, consistently calling + * super.visitXYZ at the start of the overridden + * methods will yield a preorder traversal, etc. If the component + * elements should be traversed in some other order, instead of + * calling super.visitXYZ, an overriding visit method + * should call {@code scan} with the elements in the desired order. + * + *

Methods in this class may be overridden subject to their + * general contract. Note that annotating methods in concrete + * subclasses with {@link java.lang.Override @Override} will help + * ensure that methods are overridden as intended. + * + *

WARNING: The {@code ElementVisitor} interface + * implemented by this class may have methods added to it in the + * future to accommodate new, currently unknown, language structures + * added to future versions of the Java™ programming language. + * Therefore, methods whose names begin with {@code "visit"} may be + * added to this class in the future; to avoid incompatibilities, + * classes which extend this class should not declare any instance + * methods with names beginning with {@code "visit"}. + * + *

When such a new visit method is added, the default + * implementation in this class will be to call the {@link + * #visitUnknown visitUnknown} method. A new element scanner visitor + * class will also be introduced to correspond to the new language + * level; this visitor will have different default behavior for the + * visit method in question. When the new visitor is introduced, all + * or portions of this visitor may be deprecated. + * + * @param the return type of this visitor's methods. Use {@link + * Void} for visitors that do not need to return results. + * @param

the type of the additional parameter to this visitor's + * methods. Use {@code Void} for visitors that do not need an + * additional parameter. + * + * @see ElementScanner6 + * @see ElementScanner7 + * @since 1.8 + */ +@SupportedSourceVersion(RELEASE_8) +public class ElementScanner8 extends ElementScanner7 { + /** + * Constructor for concrete subclasses; uses {@code null} for the + * default value. + */ + protected ElementScanner8(){ + super(null); + } + + /** + * Constructor for concrete subclasses; uses the argument for the + * default value. + */ + protected ElementScanner8(R defaultValue){ + super(defaultValue); + } +} --- /dev/null 2011-06-27 07:41:23.137649133 -0700 +++ new/src/share/classes/javax/lang/model/util/SimpleAnnotationValueVisitor8.java 2011-07-01 11:18:05.000000000 -0700 @@ -0,0 +1,91 @@ +/* + * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package javax.lang.model.util; + +import java.util.List; +import javax.lang.model.element.*; + +import javax.lang.model.type.TypeMirror; +import static javax.lang.model.SourceVersion.*; +import javax.lang.model.SourceVersion; +import javax.annotation.processing.SupportedSourceVersion; + +/** + * A simple visitor for annotation values with default behavior + * appropriate for the {@link SourceVersion#RELEASE_8 RELEASE_8} + * source version. Visit methods call {@link #defaultAction + * defaultAction} passing their arguments to {@code defaultAction}'s + * corresponding parameters. + * + *

Methods in this class may be overridden subject to their + * general contract. Note that annotating methods in concrete + * subclasses with {@link java.lang.Override @Override} will help + * ensure that methods are overridden as intended. + * + *

WARNING: The {@code AnnotationValueVisitor} interface + * implemented by this class may have methods added to it in the + * future to accommodate new, currently unknown, language structures + * added to future versions of the Java™ programming language. + * Therefore, methods whose names begin with {@code "visit"} may be + * added to this class in the future; to avoid incompatibilities, + * classes which extend this class should not declare any instance + * methods with names beginning with {@code "visit"}. + * + *

When such a new visit method is added, the default + * implementation in this class will be to call the {@link + * #visitUnknown visitUnknown} method. A new simple annotation + * value visitor class will also be introduced to correspond to the + * new language level; this visitor will have different default + * behavior for the visit method in question. When the new visitor is + * introduced, all or portions of this visitor may be deprecated. + * + * @param the return type of this visitor's methods + * @param

the type of the additional parameter to this visitor's methods. + * + * @see SimpleAnnotationValueVisitor6 + * @see SimpleAnnotationValueVisitor7 + * @since 1.8 + */ +@SupportedSourceVersion(RELEASE_8) +public class SimpleAnnotationValueVisitor8 extends SimpleAnnotationValueVisitor7 { + /** + * Constructor for concrete subclasses; uses {@code null} for the + * default value. + */ + protected SimpleAnnotationValueVisitor8() { + super(null); + } + + /** + * Constructor for concrete subclasses; uses the argument for the + * default value. + * + * @param defaultValue the value to assign to {@link #DEFAULT_VALUE} + */ + protected SimpleAnnotationValueVisitor8(R defaultValue) { + super(defaultValue); + } +} --- /dev/null 2011-06-27 07:41:23.137649133 -0700 +++ new/src/share/classes/javax/lang/model/util/SimpleElementVisitor8.java 2011-07-01 11:18:05.000000000 -0700 @@ -0,0 +1,94 @@ +/* + * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package javax.lang.model.util; + +import javax.lang.model.element.*; +import javax.annotation.processing.SupportedSourceVersion; +import static javax.lang.model.element.ElementKind.*; +import javax.lang.model.SourceVersion; +import static javax.lang.model.SourceVersion.*; + +/** + * A simple visitor of program elements with default behavior + * appropriate for the {@link SourceVersion#RELEASE_8 RELEASE_8} + * source version. + * + * Visit methods corresponding to {@code RELEASE_7} and earlier + * language constructs call {@link #defaultAction defaultAction}, + * passing their arguments to {@code defaultAction}'s corresponding + * parameters. + * + *

Methods in this class may be overridden subject to their + * general contract. Note that annotating methods in concrete + * subclasses with {@link java.lang.Override @Override} will help + * ensure that methods are overridden as intended. + * + *

WARNING: The {@code ElementVisitor} interface + * implemented by this class may have methods added to it in the + * future to accommodate new, currently unknown, language structures + * added to future versions of the Java™ programming language. + * Therefore, methods whose names begin with {@code "visit"} may be + * added to this class in the future; to avoid incompatibilities, + * classes which extend this class should not declare any instance + * methods with names beginning with {@code "visit"}. + * + *

When such a new visit method is added, the default + * implementation in this class will be to call the {@link + * #visitUnknown visitUnknown} method. A new simple element visitor + * class will also be introduced to correspond to the new language + * level; this visitor will have different default behavior for the + * visit method in question. When the new visitor is introduced, all + * or portions of this visitor may be deprecated. + * + * @param the return type of this visitor's methods. Use {@code Void} + * for visitors that do not need to return results. + * @param

the type of the additional parameter to this visitor's methods. Use {@code Void} + * for visitors that do not need an additional parameter. + * + * @see SimpleElementVisitor6 + * @see SimpleElementVisitor7 + * @since 1.8 + */ +@SupportedSourceVersion(RELEASE_8) +public class SimpleElementVisitor8 extends SimpleElementVisitor7 { + /** + * Constructor for concrete subclasses; uses {@code null} for the + * default value. + */ + protected SimpleElementVisitor8(){ + super(null); + } + + /** + * Constructor for concrete subclasses; uses the argument for the + * default value. + * + * @param defaultValue the value to assign to {@link #DEFAULT_VALUE} + */ + protected SimpleElementVisitor8(R defaultValue){ + super(defaultValue); + } +} --- /dev/null 2011-06-27 07:41:23.137649133 -0700 +++ new/src/share/classes/javax/lang/model/util/SimpleTypeVisitor8.java 2011-07-01 11:18:06.000000000 -0700 @@ -0,0 +1,93 @@ +/* + * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package javax.lang.model.util; + +import javax.lang.model.type.*; +import javax.annotation.processing.SupportedSourceVersion; +import javax.lang.model.SourceVersion; +import static javax.lang.model.SourceVersion.*; + +/** + * A simple visitor of types with default behavior appropriate for the + * {@link SourceVersion#RELEASE_7 RELEASE_7} source version. + * + * Visit methods corresponding to {@code RELEASE_8} and earlier + * language constructs call {@link #defaultAction defaultAction}, + * passing their arguments to {@code defaultAction}'s corresponding + * parameters. + * + *

Methods in this class may be overridden subject to their + * general contract. Note that annotating methods in concrete + * subclasses with {@link java.lang.Override @Override} will help + * ensure that methods are overridden as intended. + * + *

WARNING: The {@code TypeVisitor} interface implemented + * by this class may have methods added to it in the future to + * accommodate new, currently unknown, language structures added to + * future versions of the Java™ programming language. + * Therefore, methods whose names begin with {@code "visit"} may be + * added to this class in the future; to avoid incompatibilities, + * classes which extend this class should not declare any instance + * methods with names beginning with {@code "visit"}. + * + *

When such a new visit method is added, the default + * implementation in this class will be to call the {@link + * #visitUnknown visitUnknown} method. A new simple type visitor + * class will also be introduced to correspond to the new language + * level; this visitor will have different default behavior for the + * visit method in question. When the new visitor is introduced, all + * or portions of this visitor may be deprecated. + * + * @param the return type of this visitor's methods. Use {@link + * Void} for visitors that do not need to return results. + * @param

the type of the additional parameter to this visitor's + * methods. Use {@code Void} for visitors that do not need an + * additional parameter. + * + * @see SimpleTypeVisitor6 + * @see SimpleTypeVisitor7 + * @since 1.8 + */ +@SupportedSourceVersion(RELEASE_8) +public class SimpleTypeVisitor8 extends SimpleTypeVisitor7 { + /** + * Constructor for concrete subclasses; uses {@code null} for the + * default value. + */ + protected SimpleTypeVisitor8(){ + super(null); + } + + /** + * Constructor for concrete subclasses; uses the argument for the + * default value. + * + * @param defaultValue the value to assign to {@link #DEFAULT_VALUE} + */ + protected SimpleTypeVisitor8(R defaultValue){ + super(defaultValue); + } +} --- /dev/null 2011-06-27 07:41:23.137649133 -0700 +++ new/src/share/classes/javax/lang/model/util/TypeKindVisitor8.java 2011-07-01 11:18:06.000000000 -0700 @@ -0,0 +1,96 @@ +/* + * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package javax.lang.model.util; + +import javax.lang.model.type.*; +import javax.annotation.processing.SupportedSourceVersion; +import static javax.lang.model.element.ElementKind.*; +import static javax.lang.model.SourceVersion.*; +import javax.lang.model.SourceVersion; + +/** + * A visitor of types based on their {@linkplain TypeKind kind} with + * default behavior appropriate for the {@link SourceVersion#RELEASE_8 + * RELEASE_8} source version. For {@linkplain + * TypeMirror types} XYZ that may have more than one + * kind, the visitXYZ methods in this class delegate + * to the visitXYZKind method corresponding to the + * first argument's kind. The visitXYZKind methods + * call {@link #defaultAction defaultAction}, passing their arguments + * to {@code defaultAction}'s corresponding parameters. + * + *

Methods in this class may be overridden subject to their + * general contract. Note that annotating methods in concrete + * subclasses with {@link java.lang.Override @Override} will help + * ensure that methods are overridden as intended. + * + *

WARNING: The {@code TypeVisitor} interface implemented + * by this class may have methods added to it in the future to + * accommodate new, currently unknown, language structures added to + * future versions of the Java™ programming language. + * Therefore, methods whose names begin with {@code "visit"} may be + * added to this class in the future; to avoid incompatibilities, + * classes which extend this class should not declare any instance + * methods with names beginning with {@code "visit"}. + * + *

When such a new visit method is added, the default + * implementation in this class will be to call the {@link + * #visitUnknown visitUnknown} method. A new type kind visitor class + * will also be introduced to correspond to the new language level; + * this visitor will have different default behavior for the visit + * method in question. When the new visitor is introduced, all or + * portions of this visitor may be deprecated. + * + * @param the return type of this visitor's methods. Use {@link + * Void} for visitors that do not need to return results. + * @param

the type of the additional parameter to this visitor's + * methods. Use {@code Void} for visitors that do not need an + * additional parameter. + * + * @see TypeKindVisitor6 + * @see TypeKindVisitor7 + * @since 1.8 + */ +@SupportedSourceVersion(RELEASE_8) +public class TypeKindVisitor8 extends TypeKindVisitor7 { + /** + * Constructor for concrete subclasses to call; uses {@code null} + * for the default value. + */ + protected TypeKindVisitor8() { + super(null); + } + + /** + * Constructor for concrete subclasses to call; uses the argument + * for the default value. + * + * @param defaultValue the value to assign to {@link #DEFAULT_VALUE} + */ + protected TypeKindVisitor8(R defaultValue) { + super(defaultValue); + } +}