8043484: DPrinter does not compile

Make DPrinter compile

Reviewed-by: jjg
This commit is contained in:
Eric McCorkle 2014-06-12 11:32:23 -04:00
parent 577b60e711
commit 29e8b83b48

View file

@ -21,6 +21,12 @@
* questions.
*/
/* @test
* @bug 8043484
* @summary Make sure DPrinter.java compiles
* @compile DPrinter.java
*/
import java.io.File;
import java.io.IOException;
import java.io.PrintWriter;
@ -403,7 +409,7 @@ public class DPrinter {
printType("type", sym.type, Details.SUMMARY);
printType("erasure", sym.erasure_field, Details.SUMMARY);
sym.accept(symVisitor, null);
printAnnotations("annotations", sym.getAnnotations(), Details.SUMMARY);
printAnnotations("annotations", sym.getMetadata(), Details.SUMMARY);
indent(-1);
}
}
@ -529,11 +535,15 @@ public class DPrinter {
public class TreeVisitor extends JCTree.Visitor {
@Override
public void visitTopLevel(JCCompilationUnit tree) {
printList("packageAnnotations", tree.packageAnnotations);
printTree("pid", tree.pid);
printList("packageAnnotations", tree.getPackageAnnotations());
printList("defs", tree.defs);
}
@Override
public void visitPackageDef(JCPackageDecl tree) {
printTree("pid", tree.pid);
}
@Override
public void visitImport(JCImport tree) {
printTree("qualid", tree.qualid);
@ -945,12 +955,6 @@ public class DPrinter {
* visit method for its superclass.
*/
public class TypeVisitor implements Type.Visitor<Void,Void> {
public Void visitAnnotatedType(AnnotatedType type, Void ignore) {
printList("typeAnnotations", type.getAnnotationMirrors());
printType("underlyingType", type.unannotatedType(), Details.FULL);
return visitType(type, null);
}
public Void visitArrayType(ArrayType type, Void ignore) {
printType("elemType", type.elemtype, Details.FULL);
return visitType(type, null);