< prev index next >

test/langtools/tools/javac/lib/DPrinter.java

Print this page




 862         @Override
 863         public void visitUnary(JCUnary tree) {
 864             printTree("arg", tree.arg);
 865         }
 866 
 867         @Override
 868         public void visitBinary(JCBinary tree) {
 869             printTree("lhs", tree.lhs);
 870             printTree("rhs", tree.rhs);
 871         }
 872 
 873         @Override
 874         public void visitTypeCast(JCTypeCast tree) {
 875             printTree("clazz", tree.clazz);
 876             printTree("expr", tree.expr);
 877         }
 878 
 879         @Override
 880         public void visitTypeTest(JCInstanceOf tree) {
 881             printTree("expr", tree.expr);
 882             printTree("clazz", tree.clazz);
 883         }
 884 
 885         @Override
 886         public void visitIndexed(JCArrayAccess tree) {
 887             printTree("indexed", tree.indexed);
 888             printTree("index", tree.index);
 889         }
 890 
 891         @Override
 892         public void visitSelect(JCFieldAccess tree) {
 893             printTree("selected", tree.selected);
 894         }
 895 
 896         @Override
 897         public void visitReference(JCMemberReference tree) {
 898             printTree("expr", tree.expr);
 899             printList("typeargs", tree.typeargs);
 900         }
 901 
 902         @Override


1191 
1192         public Void visitVersion(VersionTree node, Void p) {
1193             printList("body", node.getBody());
1194             return visitBlockTag(node, null);
1195         }
1196 
1197         public Void visitOther(DocTree node, Void p) {
1198             return visitTree(node, null);
1199         }
1200 
1201         public Void visitBlockTag(DocTree node, Void p) {
1202             return visitTree(node, null);
1203         }
1204 
1205         public Void visitInlineTag(DocTree node, Void p) {
1206             return visitTree(node, null);
1207         }
1208 
1209         public Void visitTree(DocTree node, Void p) {
1210             return null;






1211         }
1212     }
1213 
1214     // </editor-fold>
1215 
1216     // <editor-fold defaultstate="collapsed" desc="Symbol visitor">
1217 
1218     protected Symbol.Visitor<Void,Void> symVisitor = new SymbolVisitor();
1219 
1220     /**
1221      * Default visitor class for Symbol objects.
1222      * Note: each visitXYZ method ends by calling the corresponding
1223      * visit method for its superclass.
1224      */
1225     class SymbolVisitor implements Symbol.Visitor<Void,Void> {
1226         @Override
1227         public Void visitClassSymbol(ClassSymbol sym, Void ignore) {
1228             printName("fullname", sym.fullname);
1229             printName("flatname", sym.flatname);
1230             printScope("members", sym.members_field);




 862         @Override
 863         public void visitUnary(JCUnary tree) {
 864             printTree("arg", tree.arg);
 865         }
 866 
 867         @Override
 868         public void visitBinary(JCBinary tree) {
 869             printTree("lhs", tree.lhs);
 870             printTree("rhs", tree.rhs);
 871         }
 872 
 873         @Override
 874         public void visitTypeCast(JCTypeCast tree) {
 875             printTree("clazz", tree.clazz);
 876             printTree("expr", tree.expr);
 877         }
 878 
 879         @Override
 880         public void visitTypeTest(JCInstanceOf tree) {
 881             printTree("expr", tree.expr);
 882             printTree("pattern", tree.pattern);
 883         }
 884 
 885         @Override
 886         public void visitIndexed(JCArrayAccess tree) {
 887             printTree("indexed", tree.indexed);
 888             printTree("index", tree.index);
 889         }
 890 
 891         @Override
 892         public void visitSelect(JCFieldAccess tree) {
 893             printTree("selected", tree.selected);
 894         }
 895 
 896         @Override
 897         public void visitReference(JCMemberReference tree) {
 898             printTree("expr", tree.expr);
 899             printList("typeargs", tree.typeargs);
 900         }
 901 
 902         @Override


1191 
1192         public Void visitVersion(VersionTree node, Void p) {
1193             printList("body", node.getBody());
1194             return visitBlockTag(node, null);
1195         }
1196 
1197         public Void visitOther(DocTree node, Void p) {
1198             return visitTree(node, null);
1199         }
1200 
1201         public Void visitBlockTag(DocTree node, Void p) {
1202             return visitTree(node, null);
1203         }
1204 
1205         public Void visitInlineTag(DocTree node, Void p) {
1206             return visitTree(node, null);
1207         }
1208 
1209         public Void visitTree(DocTree node, Void p) {
1210             return null;
1211         }
1212 
1213         @Override
1214         public Void visitAccessor(AccessorTree node, Void p) {
1215             printList("desc", node.getDescription());
1216             return visitTree(node, null);
1217         }
1218     }
1219 
1220     // </editor-fold>
1221 
1222     // <editor-fold defaultstate="collapsed" desc="Symbol visitor">
1223 
1224     protected Symbol.Visitor<Void,Void> symVisitor = new SymbolVisitor();
1225 
1226     /**
1227      * Default visitor class for Symbol objects.
1228      * Note: each visitXYZ method ends by calling the corresponding
1229      * visit method for its superclass.
1230      */
1231     class SymbolVisitor implements Symbol.Visitor<Void,Void> {
1232         @Override
1233         public Void visitClassSymbol(ClassSymbol sym, Void ignore) {
1234             printName("fullname", sym.fullname);
1235             printName("flatname", sym.flatname);
1236             printScope("members", sym.members_field);


< prev index next >