@Override public void accept(MethodVisitor visitor, MethodGenerationContext generationContext) { body.accept(visitor, generationContext); }
public T visitNode(BytecodeNode parent, BytecodeNode node) { for (BytecodeNode child : node.getChildNodes()) { child.accept(node, this); } return null; }
@Override public void accept(MethodVisitor visitor, MethodGenerationContext generationContext) { body.accept(visitor, generationContext); }
@Override public void accept(MethodVisitor visitor, MethodGenerationContext generationContext) { for (BytecodeNode node : nodes) { node.accept(visitor, generationContext); } }
@Override public void accept(MethodVisitor visitor, MethodGenerationContext generationContext) { body.accept(visitor, generationContext); }
@Override public final void accept(MethodVisitor visitor, MethodGenerationContext generationContext) { getBytecode(generationContext).accept(visitor, generationContext); }
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 visitTryCatch(BytecodeNode parent, TryCatch tryCatch) { if (tryCatch.getComment() != null) { printLine(); printLine("// %s", tryCatch.getComment()); } printLine("try {"); indentLevel++; tryCatch.getTryNode().accept(tryCatch, this); indentLevel--; printLine("}"); printLine("catch (%s) {", tryCatch.getExceptionName()); indentLevel++; tryCatch.getCatchNode().accept(tryCatch, this); indentLevel--; printLine("}"); return null; }