java/core/src/main/java/org/bondlib/TaggedProtocolStreamBonded.java [20:60]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        this.protocolReader = protocolReader;
        this.bondType = bondType;
    }

    @Override
    public final StructBondType<T> getBondType() {
        return this.bondType;
    }

    @Override
    public void serialize(ProtocolWriter protocolWriter) throws IOException {
        ArgumentHelper.ensureNotNull(protocolWriter, "protocolWriter");
        if (this.bondType == null) {
            throw new InvalidBondDataException("Cannot serialize an unknown struct type within a Bonded instance.");
        }
        // deserialize into object using object-backed temporary instance, then serialize it
        Bonded.fromObject(this.deserialize(), this.bondType).serialize(protocolWriter);
    }

    @Override
    void serialize(BondType.SerializationContext context) throws IOException {
        if (this.bondType == null) {
            throw new InvalidBondDataException("Cannot serialize an unknown struct type within a Bonded instance.");
        }
        // deserialize into object using object-backed temporary instance, then serialize it
        Bonded.fromObject(this.deserialize(), this.bondType).serialize(context);
    }

    @Override
    public <U extends BondSerializable>
    void serialize(ProtocolWriter protocolWriter, StructBondType<U> asBondType) throws IOException {
        ArgumentHelper.ensureNotNull(protocolWriter, "protocolWriter");
        ArgumentHelper.ensureNotNull(asBondType, "asBondType");
        // deserialize into object using object-backed temporary instance, then serialize it
        Bonded.fromObject(this.deserialize(asBondType), asBondType).serialize(protocolWriter);
    }

    @Override
    public T deserialize() throws IOException {
        if (this.bondType == null) {
            throw new InvalidBondDataException("Cannot deserialize an unknown struct type within a Bonded instance.");
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



java/core/src/main/java/org/bondlib/UntaggedProtocolStreamBonded.java [20:60]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        this.protocolReader = protocolReader;
        this.bondType = bondType;
    }

    @Override
    public final StructBondType<T> getBondType() {
        return this.bondType;
    }

    @Override
    public void serialize(ProtocolWriter protocolWriter) throws IOException {
        ArgumentHelper.ensureNotNull(protocolWriter, "protocolWriter");
        if (this.bondType == null) {
            throw new InvalidBondDataException("Cannot serialize an unknown struct type within a Bonded instance.");
        }
        // deserialize into object using object-backed temporary instance, then serialize it
        Bonded.fromObject(this.deserialize(), this.bondType).serialize(protocolWriter);
    }

    @Override
    void serialize(BondType.SerializationContext context) throws IOException {
        if (this.bondType == null) {
            throw new InvalidBondDataException("Cannot serialize an unknown struct type within a Bonded instance.");
        }
        // deserialize into object using object-backed temporary instance, then serialize it
        Bonded.fromObject(this.deserialize(), this.bondType).serialize(context);
    }

    @Override
    public <U extends BondSerializable>
    void serialize(ProtocolWriter protocolWriter, StructBondType<U> asBondType) throws IOException {
        ArgumentHelper.ensureNotNull(protocolWriter, "protocolWriter");
        ArgumentHelper.ensureNotNull(asBondType, "asBondType");
        // deserialize into object using object-backed temporary instance, then serialize it
        Bonded.fromObject(this.deserialize(asBondType), asBondType).serialize(protocolWriter);
    }

    @Override
    public T deserialize() throws IOException {
        if (this.bondType == null) {
            throw new InvalidBondDataException("Cannot deserialize an unknown struct type within a Bonded instance.");
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



