*/
public void accept (final ClassVisitor cv) {
String[] exceptions = new String[this.exceptions.size()];
this.exceptions.toArray(exceptions);
CodeVisitor mv = cv.visitMethod(access, name, desc, exceptions, attrs);
if (mv != null && instructions.size() > 0) {
int i;
// visits instructions
for (i = 0; i < instructions.size(); ++i) {
Object insn = instructions.get(i);
if (insn instanceof Label) {
mv.visitLabel((Label)insn);
} else {
((AbstractInsnNode)insn).accept(mv);
}
}
// visits try catch blocks
for (i = 0; i < tryCatchBlocks.size(); ++i) {
((TryCatchBlockNode)tryCatchBlocks.get(i)).accept(mv);
}
// visits maxs
mv.visitMaxs(maxStack, maxLocals);
// visits local variables
for (i = 0; i < localVariables.size(); ++i) {
((LocalVariableNode)localVariables.get(i)).accept(mv);
}
// visits line numbers
for (i = 0; i < lineNumbers.size(); ++i) {
((LineNumberNode)lineNumbers.get(i)).accept(mv);
}
// visits the code attributes
Attribute attrs = codeAttrs;
while (attrs != null) {
mv.visitAttribute(attrs);
attrs = attrs.next;
}
}
}