2007-12-01 00:00:00 +00:00
|
|
|
/*
|
|
|
|
* @test /nodynamiccopyright/
|
|
|
|
* @bug 6362067
|
|
|
|
* @summary Messager methods do not print out source position information
|
2012-12-21 08:45:43 -08:00
|
|
|
* @library /tools/javac/lib
|
2010-09-29 23:27:57 -07:00
|
|
|
* @build JavacTestingAbstractProcessor T6362067
|
2007-12-01 00:00:00 +00:00
|
|
|
* @compile -processor T6362067 -proc:only T6362067.java
|
2010-07-26 14:18:45 -07:00
|
|
|
* @compile/ref=T6362067.out -XDrawDiagnostics -processor T6362067 -proc:only T6362067.java
|
2007-12-01 00:00:00 +00:00
|
|
|
*/
|
|
|
|
import java.util.Set;
|
|
|
|
import javax.annotation.processing.*;
|
|
|
|
import javax.lang.model.element.*;
|
|
|
|
import static javax.tools.Diagnostic.Kind.*;
|
|
|
|
|
2010-09-29 23:27:57 -07:00
|
|
|
@Deprecated // convenient test annotations
|
|
|
|
@SuppressWarnings({""})
|
|
|
|
public class T6362067 extends JavacTestingAbstractProcessor {
|
2007-12-01 00:00:00 +00:00
|
|
|
public boolean process(Set<? extends TypeElement> annos,
|
|
|
|
RoundEnvironment roundEnv) {
|
2010-09-29 23:27:57 -07:00
|
|
|
|
2007-12-01 00:00:00 +00:00
|
|
|
for (Element e: roundEnv.getRootElements()) {
|
2010-09-29 23:27:57 -07:00
|
|
|
messager.printMessage(NOTE, "note:elem", e);
|
2007-12-01 00:00:00 +00:00
|
|
|
for (AnnotationMirror a: e.getAnnotationMirrors()) {
|
2010-09-29 23:27:57 -07:00
|
|
|
messager.printMessage(NOTE, "note:anno", e, a);
|
2007-12-01 00:00:00 +00:00
|
|
|
for (AnnotationValue v: a.getElementValues().values()) {
|
2010-09-29 23:27:57 -07:00
|
|
|
messager.printMessage(NOTE, "note:value", e, a, v);
|
2007-12-01 00:00:00 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2010-09-29 23:27:57 -07:00
|
|
|
|
2007-12-01 00:00:00 +00:00
|
|
|
if (roundEnv.processingOver())
|
2010-09-29 23:27:57 -07:00
|
|
|
messager.printMessage(NOTE, "note:nopos");
|
2007-12-01 00:00:00 +00:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|