class AnalyzerAdapter extends MethodVisitor {

  @Override
  public void visitFrame(
      final int type,
      final int numLocal,
      final Object[] local,
      final int numStack,
      final Object[] stack) {
    if (type != Opcodes.F_NEW) { // Uncompressed frame.
      throw new IllegalArgumentException(
          "AnalyzerAdapter only accepts expanded frames (see ClassReader.EXPAND_FRAMES)");
    }

    super.visitFrame(type, numLocal, local, numStack, stack);

    if (this.locals != null) {
      this.locals.clear();
      this.stack.clear();
    } else {
      this.locals = new ArrayList<>();
      this.stack = new ArrayList<>();
    }
    visitFrameTypes(numLocal, local, this.locals);
    visitFrameTypes(numStack, stack, this.stack);
    maxLocals = Math.max(maxLocals, this.locals.size());
    maxStack = Math.max(maxStack, this.stack.size());
  }

  public  AnalyzerAdapter(
      final String owner,
      final int access,
      final String name,
      final String descriptor,
      final MethodVisitor methodVisitor);
  protected  AnalyzerAdapter(
      final int api,
      final String owner,
      final int access,
      final String name,
      final String descriptor,
      final MethodVisitor methodVisitor);

}