private void visitNestedNode(String description, ByteCodeNode node, ByteCodeNode parent) { printLine(description + " {"); indentLevel++; node.accept(parent, this); indentLevel--; printLine("}"); }
private void visitBlockContents(ByteCodeBlock block) { for (ByteCodeNode node : block.getChildNodes()) { if (node instanceof ByteCodeBlock) { ByteCodeBlock childBlock = (ByteCodeBlock) node; if (childBlock.getDescription() != null) { visitBlock(block, childBlock); } else { visitBlockContents(childBlock); } } else { node.accept(node, this); } } }
@Override public void accept(MethodVisitor visitor) { for (ByteCodeNode node : nodes) { node.accept(visitor); } }