class InstructionAdapter extends MethodVisitor {

  @Override
  public void visitMethodInsn(
      final int opcodeAndSource,
      final String owner,
      final String name,
      final String descriptor,
      final boolean isInterface) {
    if (api < Opcodes.ASM5 && (opcodeAndSource & Opcodes.SOURCE_DEPRECATED) == 0) {
      // Redirect the call to the deprecated version of this method.
      super.visitMethodInsn(opcodeAndSource, owner, name, descriptor, isInterface);
      return;
    }
    int opcode = opcodeAndSource & ~Opcodes.SOURCE_MASK;

    switch (opcode) {
      case Opcodes.INVOKESPECIAL:
        invokespecial(owner, name, descriptor, isInterface);
        break;
      case Opcodes.INVOKEVIRTUAL:
        invokevirtual(owner, name, descriptor, isInterface);
        break;
      case Opcodes.INVOKESTATIC:
        invokestatic(owner, name, descriptor, isInterface);
        break;
      case Opcodes.INVOKEINTERFACE:
        invokeinterface(owner, name, descriptor);
        break;
      default:
        throw new IllegalArgumentException();
    }
  }

  public  InstructionAdapter(final MethodVisitor methodVisitor);
  protected  InstructionAdapter(final int api, final MethodVisitor methodVisitor);

}