private void serializeSelf(Stub stub,
                             @NotNull StubOutputStream stream,
                             @NotNull SerializationState state) throws IOException {
    if (((ObjectStubBase<?>)stub).isDangling()) {
      stream.writeByte(0);
    }
    writeSerializerId(stub, stream, state).serialize(stub, stream);
  }
private void serializeSelf(Stub stub,
                             @NotNull StubOutputStream stream,
                             @NotNull SerializationState state)