langtools/test/tools/javac/processing/6365040/T6365040.java
author akulyakh
Thu, 21 May 2015 11:41:04 -0700
changeset 30730 d3ce7619db2c
parent 28335 0b37a4232e35
permissions -rw-r--r--
8076543: Add @modules as needed to the langtools tests Reviewed-by: jjg, shurailine
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
10
06bc494ca11e Initial load
duke
parents:
diff changeset
     1
/*
28335
0b37a4232e35 8058373: Group 10a: golden files for tests in tools/javac dir
sogoel
parents: 14963
diff changeset
     2
 * @test /nodynamiccopyright/
10
06bc494ca11e Initial load
duke
parents:
diff changeset
     3
 * @bug 6365040 6358129
06bc494ca11e Initial load
duke
parents:
diff changeset
     4
 * @summary Test -processor foo,bar,baz
06bc494ca11e Initial load
duke
parents:
diff changeset
     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
f16f91662ad8 6983738: Use a JavacTestingAbstractProcessor
darcy
parents: 5520
diff changeset
     9
 * @build   JavacTestingAbstractProcessor
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    10
 * @compile ProcFoo.java
06bc494ca11e Initial load
duke
parents:
diff changeset
    11
 * @compile ProcBar.java
06bc494ca11e Initial load
duke
parents:
diff changeset
    12
 * @compile T6365040.java
06bc494ca11e Initial load
duke
parents:
diff changeset
    13
 * @compile      -processor ProcFoo,ProcBar,T6365040  -proc:only T6365040.java
06bc494ca11e Initial load
duke
parents:
diff changeset
    14
 * @compile      -processor T6365040                  -proc:only T6365040.java
06bc494ca11e Initial load
duke
parents:
diff changeset
    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
06bc494ca11e Initial load
duke
parents:
diff changeset
    18
 */
06bc494ca11e Initial load
duke
parents:
diff changeset
    19
06bc494ca11e Initial load
duke
parents:
diff changeset
    20
import java.util.Set;
06bc494ca11e Initial load
duke
parents:
diff changeset
    21
import javax.annotation.processing.AbstractProcessor;
06bc494ca11e Initial load
duke
parents:
diff changeset
    22
import javax.annotation.processing.RoundEnvironment;
06bc494ca11e Initial load
duke
parents:
diff changeset
    23
import javax.annotation.processing.SupportedAnnotationTypes;
06bc494ca11e Initial load
duke
parents:
diff changeset
    24
import javax.lang.model.element.TypeElement;
06bc494ca11e Initial load
duke
parents:
diff changeset
    25
import static javax.tools.Diagnostic.Kind.*;
06bc494ca11e Initial load
duke
parents:
diff changeset
    26
6720
f16f91662ad8 6983738: Use a JavacTestingAbstractProcessor
darcy
parents: 5520
diff changeset
    27
public class T6365040 extends JavacTestingAbstractProcessor {
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    28
    public boolean process(Set<? extends TypeElement> annotations,
06bc494ca11e Initial load
duke
parents:
diff changeset
    29
                           RoundEnvironment roundEnvironment) {
06bc494ca11e Initial load
duke
parents:
diff changeset
    30
        if (!roundEnvironment.processingOver())
6720
f16f91662ad8 6983738: Use a JavacTestingAbstractProcessor
darcy
parents: 5520
diff changeset
    31
            messager.printMessage(NOTE, "Hello from T6365040");
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    32
        return true;
06bc494ca11e Initial load
duke
parents:
diff changeset
    33
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
    34
}