Exemplo n.º 1
0
 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);
     }
   }
 }
Exemplo n.º 2
0
 private void visitNestedNode(String description, ByteCodeNode node, ByteCodeNode parent) {
   printLine(description + " {");
   indentLevel++;
   node.accept(parent, this);
   indentLevel--;
   printLine("}");
 }
Exemplo n.º 3
0
 @Override
 public void accept(MethodVisitor visitor) {
   for (ByteCodeNode node : nodes) {
     node.accept(visitor);
   }
 }
Exemplo n.º 4
0
 @Override
 public Void visitNode(ByteCodeNode parent, ByteCodeNode node) {
   printLine(node.toString());
   super.visitNode(parent, node);
   return null;
 }