in finagle-thrift/src/main/java/com/twitter/finagle/thrift/thrift/Span.java [1057:1121]
public void write(org.apache.thrift.protocol.TProtocol prot, Span struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetTrace_id()) {
optionals.set(0);
}
if (struct.isSetName()) {
optionals.set(1);
}
if (struct.isSetId()) {
optionals.set(2);
}
if (struct.isSetParent_id()) {
optionals.set(3);
}
if (struct.isSetAnnotations()) {
optionals.set(4);
}
if (struct.isSetBinary_annotations()) {
optionals.set(5);
}
if (struct.isSetDebug()) {
optionals.set(6);
}
if (struct.isSetTimestamp()) {
optionals.set(7);
}
oprot.writeBitSet(optionals, 8);
if (struct.isSetTrace_id()) {
oprot.writeI64(struct.trace_id);
}
if (struct.isSetName()) {
oprot.writeString(struct.name);
}
if (struct.isSetId()) {
oprot.writeI64(struct.id);
}
if (struct.isSetParent_id()) {
oprot.writeI64(struct.parent_id);
}
if (struct.isSetAnnotations()) {
{
oprot.writeI32(struct.annotations.size());
for (Annotation _iter8 : struct.annotations)
{
_iter8.write(oprot);
}
}
}
if (struct.isSetBinary_annotations()) {
{
oprot.writeI32(struct.binary_annotations.size());
for (BinaryAnnotation _iter9 : struct.binary_annotations)
{
_iter9.write(oprot);
}
}
}
if (struct.isSetDebug()) {
oprot.writeBool(struct.debug);
}
if (struct.isSetTimestamp()) {
oprot.writeI64(struct.timestamp);
}
}