cn.wjybxx.btreecodec.branch.join.JoinSelectorNCodec Maven / Gradle / Ivy
package cn.wjybxx.btreecodec.branch.join;
import cn.wjybxx.btree.branch.join.JoinSelectorN;
import cn.wjybxx.dson.WireType;
import cn.wjybxx.dson.text.NumberStyle;
import cn.wjybxx.dson.text.ObjectStyle;
import cn.wjybxx.dsoncodec.AbstractDsonCodec;
import cn.wjybxx.dsoncodec.DsonObjectReader;
import cn.wjybxx.dsoncodec.DsonObjectWriter;
import cn.wjybxx.dsoncodec.TypeInfo;
import javax.annotation.Nonnull;
import javax.annotation.processing.Generated;
@SuppressWarnings({"unchecked", "rawtypes", "unused"})
@Generated("cn.wjybxx.dsonapt.CodecProcessor")
public final class JoinSelectorNCodec extends AbstractDsonCodec {
public static final TypeInfo types_required = TypeInfo.of(int.class);
public static final TypeInfo types_failFast = TypeInfo.of(boolean.class);
public static final String names_required = "required";
public static final String names_failFast = "failFast";
@Override
@Nonnull
public Class getEncoderClass() {
return JoinSelectorN.class;
}
@Override
public void writeFields(DsonObjectWriter writer, JoinSelectorN instance, TypeInfo> typeInfo,
ObjectStyle style) {
writer.writeInt(names_required, instance.getRequired(), WireType.VARINT, NumberStyle.SIMPLE);
writer.writeBoolean(names_failFast, instance.isFailFast());
}
@Override
protected JoinSelectorN newInstance(DsonObjectReader reader, TypeInfo> typeInfo) {
return new JoinSelectorN();
}
@Override
public void readFields(DsonObjectReader reader, JoinSelectorN instance, TypeInfo> typeInfo) {
instance.setRequired(reader.readInt(names_required));
instance.setFailFast(reader.readBoolean(names_failFast));
}
}