这是类visitMethodInsn方法的主体MethodNode:
@Override
public void visitMethodInsn(
final int opcode,
final @InternalForm String owner,
final @Identifier String name,
final @MethodDescriptor String descriptor,
final boolean isInterface) {
if (api < Opcodes.ASM5) {
super.visitMethodInsn(opcode, owner, name, descriptor, isInterface);
return;
}
instructions.add(new MethodInsnNode(opcode, owner, name, descriptor, isInterface));
}
如您所见,instructions list如果asm api版本小于,则不会将字节码添加到5。背后的原因是什么?
相关分类