docs: private final void writeMethodTo(CodeBuilder builder) {
      builder.visitCode();
      gen(builder);
      try {
        builder.endMethod();
      } catch (Throwable t) {
        // ASM fails in bizarre ways, attach a trace of the thing we tried to generate to the
        // exception.
        throw new RuntimeException("Failed to generate method:\n" + this, t);
      }
    }