langtools/test/tools/javac/processing/model/util/OverridesSpecEx.java
changeset 4935 ff8adaa7bb8e
parent 10 06bc494ca11e
child 5520 86e4b9a9da40
equal deleted inserted replaced
4934:c6a2cf3b6b82 4935:ff8adaa7bb8e
    38 import javax.lang.model.util.*;
    38 import javax.lang.model.util.*;
    39 
    39 
    40 import static javax.lang.model.util.ElementFilter.*;
    40 import static javax.lang.model.util.ElementFilter.*;
    41 
    41 
    42 
    42 
    43 @SupportedSourceVersion(SourceVersion.RELEASE_6)
       
    44 @SupportedAnnotationTypes("*")
    43 @SupportedAnnotationTypes("*")
    45 public class OverridesSpecEx extends AbstractProcessor {
    44 public class OverridesSpecEx extends AbstractProcessor {
    46 
    45 
    47     Elements elements;
    46     Elements elements;
    48     Types types;
    47     Types types;
    56     public boolean process(Set<? extends TypeElement> annoTypes,
    55     public boolean process(Set<? extends TypeElement> annoTypes,
    57                            RoundEnvironment round) {
    56                            RoundEnvironment round) {
    58         if (!round.processingOver())
    57         if (!round.processingOver())
    59             doit(annoTypes, round);
    58             doit(annoTypes, round);
    60         return true;
    59         return true;
       
    60     }
       
    61 
       
    62     @Override
       
    63     public SourceVersion getSupportedSourceVersion() {
       
    64         return SourceVersion.latest();
    61     }
    65     }
    62 
    66 
    63     private void doit(Set<? extends TypeElement> annoTypes,
    67     private void doit(Set<? extends TypeElement> annoTypes,
    64                       RoundEnvironment round) {
    68                       RoundEnvironment round) {
    65         TypeElement string = elements.getTypeElement("java.lang.String");
    69         TypeElement string = elements.getTypeElement("java.lang.String");