Exemplo n.º 1
0
 public AbstractInsnNode[] collapse() {
   if (instructions != null) {
     return instructions;
   }
   instructions = new AbstractInsnNode[total()];
   int i = 0;
   for (AbstractNode n : this) {
     AbstractInsnNode[] nodes = n.collapse();
     System.arraycopy(nodes, 0, instructions, i, nodes.length);
     i += nodes.length;
   }
   if (instructions.length - i != 1) {
     throw new RuntimeException();
   }
   instructions[i] = insn();
   return instructions;
 }