--- 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); + } + } }