test/tools/javac/processing/T6920317.java

changeset 699
d2aaaec153e8
parent 554
9d9f26857129
child 1308
37008b4cd97a
equal deleted inserted replaced
698:f94af0667151 699:d2aaaec153e8
23 23
24 /* 24 /*
25 * @test 25 * @test
26 * @bug 6920317 26 * @bug 6920317
27 * @summary package-info.java file has to be specified on the javac cmdline, else it will not be avail 27 * @summary package-info.java file has to be specified on the javac cmdline, else it will not be avail
28 * @library ../lib
28 */ 29 */
29 30
30 import java.io.*; 31 import java.io.*;
31 import java.util.*; 32 import java.util.*;
32 import javax.annotation.processing.*; 33 import javax.annotation.processing.*;
347 File cl_pkgInfo_java; 348 File cl_pkgInfo_java;
348 349
349 /** Annotation processor used to verify the expected value for the 350 /** Annotation processor used to verify the expected value for the
350 package annotations found by javac. */ 351 package annotations found by javac. */
351 @SupportedOptions({ "gen", "expect" }) 352 @SupportedOptions({ "gen", "expect" })
352 @SupportedAnnotationTypes({"*"}) 353 public static class Processor extends JavacTestingAbstractProcessor {
353 public static class Processor extends AbstractProcessor {
354 public SourceVersion getSupportedSourceVersion() {
355 return SourceVersion.latest();
356 }
357
358 public boolean process(Set<? extends TypeElement> annots, RoundEnvironment renv) { 354 public boolean process(Set<? extends TypeElement> annots, RoundEnvironment renv) {
359 round++; 355 round++;
360 System.err.println("Round " + round + " annots:" + annots + " rootElems:" + renv.getRootElements()); 356 System.err.println("Round " + round + " annots:" + annots + " rootElems:" + renv.getRootElements());
361 357
362 // if this is the first round and the gen option is given, use the filer to create 358 // if this is the first round and the gen option is given, use the filer to create

mercurial