a.analyze(ca.classNode, method);
} catch (Exception ignored) {
}
final Frame[] frames = a.getFrames();
TraceCodeVisitor cv = new TraceCodeVisitor(null) {
public void visitMaxs (int maxStack, int maxLocals) {
for (int i = 0; i < text.size(); ++i) {
String s = frames[i] == null ? "null" : frames[i].toString();
while (s.length() < Math.max(20, maxStack+maxLocals+1)) {
s += " ";
}
System.err.print(
Integer.toString(i + 1000).substring(1) + " " + s + " : "
+ text.get(i));
}
System.err.println();
}
};
for (int j = 0; j < method.instructions.size(); ++j) {
Object insn = method.instructions.get(j);
if (insn instanceof AbstractInsnNode) {
((AbstractInsnNode)insn).accept(cv);
} else {
cv.visitLabel((Label)insn);
}
}
cv.visitMaxs(0, 0);
}
}
}
}