@NotNull @Override public A read(Bytes in, A using) { if (using == null) using = new A(); using.str_ = in.readUtf8(); int size = (int) in.readStopBit(); if (size >= 0) { if (using.list_ == null) { using.list_ = new ArrayList<>(size); } else { using.list_.clear(); if (using.list_ instanceof ArrayList) ((ArrayList) using.list_).ensureCapacity(size); } for (int i = 0; i < size; i++) { B b = new B(); b.readMarshallable(in); using.list_.add(b); } } else { assert size == -1; using.list_ = null; } return using; }
@Override public void readMarshallable(Bytes in) { str_ = in.readUtf8(); }