default void serializeCustomStub(@Nullable Stub stub, @NotNull StubOutputStream stream) throws IOException {
    final boolean hasCustomStub = stub != null;
    stream.writeBoolean(hasCustomStub);

    if (hasCustomStub) {
      stream.writeName(stub.getTypeClass().getCanonicalName());
      stub.serialize(stream);
    }
  }
default void serializeCustomStub(@Nullable Stub stub, @NotNull StubOutputStream stream)