author | akulyakh |
Thu, 21 May 2015 11:41:04 -0700 | |
changeset 30730 | d3ce7619db2c |
parent 28335 | 0b37a4232e35 |
permissions | -rw-r--r-- |
10 | 1 |
/* |
28335
0b37a4232e35
8058373: Group 10a: golden files for tests in tools/javac dir
sogoel
parents:
14963
diff
changeset
|
2 |
* @test /nodynamiccopyright/ |
10 | 3 |
* @bug 6365040 6358129 |
4 |
* @summary Test -processor foo,bar,baz |
|
5 |
* @author Joseph D. Darcy |
|
14963
974d4423c999
8005282: Use @library tag with non-relative path for javac tests
darcy
parents:
6720
diff
changeset
|
6 |
* @library /tools/javac/lib |
30730
d3ce7619db2c
8076543: Add @modules as needed to the langtools tests
akulyakh
parents:
28335
diff
changeset
|
7 |
* @modules java.compiler |
d3ce7619db2c
8076543: Add @modules as needed to the langtools tests
akulyakh
parents:
28335
diff
changeset
|
8 |
* jdk.compiler |
6720 | 9 |
* @build JavacTestingAbstractProcessor |
10 | 10 |
* @compile ProcFoo.java |
11 |
* @compile ProcBar.java |
|
12 |
* @compile T6365040.java |
|
13 |
* @compile -processor ProcFoo,ProcBar,T6365040 -proc:only T6365040.java |
|
14 |
* @compile -processor T6365040 -proc:only T6365040.java |
|
15 |
* @compile -processor T6365040,NotThere, -proc:only T6365040.java |
|
28335
0b37a4232e35
8058373: Group 10a: golden files for tests in tools/javac dir
sogoel
parents:
14963
diff
changeset
|
16 |
* @compile/fail/ref=T6365040.out -XDrawDiagnostics -processor NotThere -proc:only T6365040.java |
0b37a4232e35
8058373: Group 10a: golden files for tests in tools/javac dir
sogoel
parents:
14963
diff
changeset
|
17 |
* @compile/fail/ref=T6365040.out -XDrawDiagnostics -processor NotThere,T6365040 -proc:only T6365040.java |
10 | 18 |
*/ |
19 |
||
20 |
import java.util.Set; |
|
21 |
import javax.annotation.processing.AbstractProcessor; |
|
22 |
import javax.annotation.processing.RoundEnvironment; |
|
23 |
import javax.annotation.processing.SupportedAnnotationTypes; |
|
24 |
import javax.lang.model.element.TypeElement; |
|
25 |
import static javax.tools.Diagnostic.Kind.*; |
|
26 |
||
6720 | 27 |
public class T6365040 extends JavacTestingAbstractProcessor { |
10 | 28 |
public boolean process(Set<? extends TypeElement> annotations, |
29 |
RoundEnvironment roundEnvironment) { |
|
30 |
if (!roundEnvironment.processingOver()) |
|
6720 | 31 |
messager.printMessage(NOTE, "Hello from T6365040"); |
10 | 32 |
return true; |
33 |
} |
|
34 |
} |