1/* 2 * @test /nodynamiccopyright/ 3 * @bug 6362067 4 * @summary Messager methods do not print out source position information 5 * @library /tools/javac/lib 6 * @modules java.compiler 7 * jdk.compiler 8 * @build JavacTestingAbstractProcessor T6362067 9 * @compile -processor T6362067 -proc:only T6362067.java 10 * @compile/ref=T6362067.out -XDrawDiagnostics -processor T6362067 -proc:only T6362067.java 11 */ 12import java.util.Set; 13import javax.annotation.processing.*; 14import javax.lang.model.element.*; 15import static javax.tools.Diagnostic.Kind.*; 16 17@Deprecated // convenient test annotations 18@SuppressWarnings({""}) 19public class T6362067 extends JavacTestingAbstractProcessor { 20 public boolean process(Set<? extends TypeElement> annos, 21 RoundEnvironment roundEnv) { 22 23 for (Element e: roundEnv.getRootElements()) { 24 messager.printMessage(NOTE, "note:elem", e); 25 for (AnnotationMirror a: e.getAnnotationMirrors()) { 26 messager.printMessage(NOTE, "note:anno", e, a); 27 for (AnnotationValue v: a.getElementValues().values()) { 28 messager.printMessage(NOTE, "note:value", e, a, v); 29 } 30 } 31 } 32 33 if (roundEnv.processingOver()) 34 messager.printMessage(NOTE, "note:nopos"); 35 return true; 36 } 37} 38