test/tools/javac/api/TestOperators.java

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * 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
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.

@@ -24,11 +24,12 @@
 /*
  * @test
  * @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
  */
 
 import java.util.Set;
 import javax.annotation.processing.*;

@@ -44,11 +45,11 @@
 @interface TestMe {
     Tree.Kind value();
 }
 
 @SupportedAnnotationTypes("TestMe")
-public class TestOperators extends AbstractProcessor {
+public class TestOperators extends JavacTestingAbstractProcessor {
 
     @TestMe(POSTFIX_INCREMENT)
     public int test_POSTFIX_INCREMENT(int i) {
         return i++;
     }

@@ -297,11 +298,11 @@
                            RoundEnvironment roundEnvironment)
     {
         final Trees trees = Trees.instance(processingEnv);
         final Messager log = processingEnv.getMessager();
         final Elements elements = processingEnv.getElementUtils();
-        class Scan extends ElementScanner7<Void,Void> {
+        class Scan extends LatestElementScanner<Void,Void> {
             @Override
             public Void visitExecutable(ExecutableElement e, Void p) {
                 Object debug = e; // info for exception handler
                 try {
                     TestMe info = e.getAnnotation(TestMe.class);

@@ -341,7 +342,6 @@
         for (Element e : roundEnvironment.getRootElements()) {
             scan.scan(e);
         }
         return true;
     }
-
 }