private void serializeChildren(@NotNull Stub parent,
                                 @NotNull StubOutputStream stream,
                                 @NotNull SerializationState state) throws IOException {
    final List<? extends Stub> children = parent.getChildrenStubs();
    DataInputOutputUtil.writeINT(stream, children.size());
    for (Stub child : children) {
      serializeSelf(child, stream, state);
      serializeChildren(child, stream, state);
    }
  }
private void serializeChildren(@NotNull Stub parent,
                                 @NotNull StubOutputStream stream,
                                 @NotNull SerializationState state)