langtools/test/tools/javac/lib/JavacTestingAbstractProcessor.java
changeset 25690 b1dac768ab79
parent 22170 62da5257a0a7
child 36526 3b41f1c69604
equal deleted inserted replaced
25608:e1be1d88a557 25690:b1dac768ab79
    26 import javax.lang.model.SourceVersion;
    26 import javax.lang.model.SourceVersion;
    27 import javax.lang.model.util.*;
    27 import javax.lang.model.util.*;
    28 import static javax.lang.model.SourceVersion.*;
    28 import static javax.lang.model.SourceVersion.*;
    29 
    29 
    30 /**
    30 /**
    31  * An abstract annotation processor tailored to javac regression testing.
    31  * An abstract annotation processor tailored to {@code javac} regression testing.
    32  */
    32  */
    33 public abstract class JavacTestingAbstractProcessor extends AbstractProcessor {
    33 public abstract class JavacTestingAbstractProcessor extends AbstractProcessor {
    34     private static final Set<String> allAnnotations;
    34     private static final Set<String> allAnnotations;
    35 
    35 
    36     static {
    36     static {
   101      * The set of visitors below will directly extend the most recent
   101      * The set of visitors below will directly extend the most recent
   102      * corresponding platform visitor type.
   102      * corresponding platform visitor type.
   103      */
   103      */
   104 
   104 
   105     @SupportedSourceVersion(RELEASE_9)
   105     @SupportedSourceVersion(RELEASE_9)
   106     public static abstract class AbstractAnnotationValueVisitor<R, P> extends AbstractAnnotationValueVisitor8<R, P> {
   106     public static abstract class AbstractAnnotationValueVisitor<R, P> extends AbstractAnnotationValueVisitor9<R, P> {
   107 
   107 
   108         /**
   108         /**
   109          * Constructor for concrete subclasses to call.
   109          * Constructor for concrete subclasses to call.
   110          */
   110          */
   111         protected AbstractAnnotationValueVisitor() {
   111         protected AbstractAnnotationValueVisitor() {
   112             super();
   112             super();
   113         }
   113         }
   114     }
   114     }
   115 
   115 
   116     @SupportedSourceVersion(RELEASE_9)
   116     @SupportedSourceVersion(RELEASE_9)
   117     public static abstract class AbstractElementVisitor<R, P> extends AbstractElementVisitor8<R, P> {
   117     public static abstract class AbstractElementVisitor<R, P> extends AbstractElementVisitor9<R, P> {
   118         /**
   118         /**
   119          * Constructor for concrete subclasses to call.
   119          * Constructor for concrete subclasses to call.
   120          */
   120          */
   121         protected AbstractElementVisitor(){
   121         protected AbstractElementVisitor(){
   122             super();
   122             super();
   123         }
   123         }
   124     }
   124     }
   125 
   125 
   126     @SupportedSourceVersion(RELEASE_9)
   126     @SupportedSourceVersion(RELEASE_9)
   127     public static abstract class AbstractTypeVisitor<R, P> extends AbstractTypeVisitor8<R, P> {
   127     public static abstract class AbstractTypeVisitor<R, P> extends AbstractTypeVisitor9<R, P> {
   128         /**
   128         /**
   129          * Constructor for concrete subclasses to call.
   129          * Constructor for concrete subclasses to call.
   130          */
   130          */
   131         protected AbstractTypeVisitor() {
   131         protected AbstractTypeVisitor() {
   132             super();
   132             super();
   133         }
   133         }
   134     }
   134     }
   135 
   135 
   136     @SupportedSourceVersion(RELEASE_9)
   136     @SupportedSourceVersion(RELEASE_9)
   137     public static class ElementKindVisitor<R, P> extends ElementKindVisitor8<R, P> {
   137     public static class ElementKindVisitor<R, P> extends ElementKindVisitor9<R, P> {
   138         /**
   138         /**
   139          * Constructor for concrete subclasses; uses {@code null} for the
   139          * Constructor for concrete subclasses; uses {@code null} for the
   140          * default value.
   140          * default value.
   141          */
   141          */
   142         protected ElementKindVisitor() {
   142         protected ElementKindVisitor() {
   153             super(defaultValue);
   153             super(defaultValue);
   154         }
   154         }
   155     }
   155     }
   156 
   156 
   157     @SupportedSourceVersion(RELEASE_9)
   157     @SupportedSourceVersion(RELEASE_9)
   158     public static class ElementScanner<R, P> extends ElementScanner8<R, P> {
   158     public static class ElementScanner<R, P> extends ElementScanner9<R, P> {
   159         /**
   159         /**
   160          * Constructor for concrete subclasses; uses {@code null} for the
   160          * Constructor for concrete subclasses; uses {@code null} for the
   161          * default value.
   161          * default value.
   162          */
   162          */
   163         protected ElementScanner(){
   163         protected ElementScanner(){
   172             super(defaultValue);
   172             super(defaultValue);
   173         }
   173         }
   174     }
   174     }
   175 
   175 
   176     @SupportedSourceVersion(RELEASE_9)
   176     @SupportedSourceVersion(RELEASE_9)
   177     public static class SimpleAnnotationValueVisitor<R, P> extends SimpleAnnotationValueVisitor8<R, P> {
   177     public static class SimpleAnnotationValueVisitor<R, P> extends SimpleAnnotationValueVisitor9<R, P> {
   178         /**
   178         /**
   179          * Constructor for concrete subclasses; uses {@code null} for the
   179          * Constructor for concrete subclasses; uses {@code null} for the
   180          * default value.
   180          * default value.
   181          */
   181          */
   182         protected SimpleAnnotationValueVisitor() {
   182         protected SimpleAnnotationValueVisitor() {
   193             super(defaultValue);
   193             super(defaultValue);
   194         }
   194         }
   195     }
   195     }
   196 
   196 
   197     @SupportedSourceVersion(RELEASE_9)
   197     @SupportedSourceVersion(RELEASE_9)
   198     public static class SimpleElementVisitor<R, P> extends SimpleElementVisitor8<R, P> {
   198     public static class SimpleElementVisitor<R, P> extends SimpleElementVisitor9<R, P> {
   199         /**
   199         /**
   200          * Constructor for concrete subclasses; uses {@code null} for the
   200          * Constructor for concrete subclasses; uses {@code null} for the
   201          * default value.
   201          * default value.
   202          */
   202          */
   203         protected SimpleElementVisitor(){
   203         protected SimpleElementVisitor(){
   214             super(defaultValue);
   214             super(defaultValue);
   215         }
   215         }
   216     }
   216     }
   217 
   217 
   218     @SupportedSourceVersion(RELEASE_9)
   218     @SupportedSourceVersion(RELEASE_9)
   219     public static class SimpleTypeVisitor<R, P> extends SimpleTypeVisitor8<R, P> {
   219     public static class SimpleTypeVisitor<R, P> extends SimpleTypeVisitor9<R, P> {
   220         /**
   220         /**
   221          * Constructor for concrete subclasses; uses {@code null} for the
   221          * Constructor for concrete subclasses; uses {@code null} for the
   222          * default value.
   222          * default value.
   223          */
   223          */
   224         protected SimpleTypeVisitor(){
   224         protected SimpleTypeVisitor(){
   235             super(defaultValue);
   235             super(defaultValue);
   236         }
   236         }
   237     }
   237     }
   238 
   238 
   239     @SupportedSourceVersion(RELEASE_9)
   239     @SupportedSourceVersion(RELEASE_9)
   240     public static class TypeKindVisitor<R, P> extends TypeKindVisitor8<R, P> {
   240     public static class TypeKindVisitor<R, P> extends TypeKindVisitor9<R, P> {
   241         /**
   241         /**
   242          * Constructor for concrete subclasses to call; uses {@code null}
   242          * Constructor for concrete subclasses to call; uses {@code null}
   243          * for the default value.
   243          * for the default value.
   244          */
   244          */
   245         protected TypeKindVisitor() {
   245         protected TypeKindVisitor() {