in finagle-thrift/src/main/java/com/twitter/finagle/thrift/thrift/ResponseHeader.java [418:475]
public void read(org.apache.thrift.protocol.TProtocol iprot, ResponseHeader struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // SPANS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list32 = iprot.readListBegin();
struct.spans = new java.util.ArrayList<Span>(_list32.size);
Span _elem33;
for (int _i34 = 0; _i34 < _list32.size; ++_i34)
{
_elem33 = new Span();
_elem33.read(iprot);
struct.spans.add(_elem33);
}
iprot.readListEnd();
}
struct.setSpansIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // CONTEXTS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list35 = iprot.readListBegin();
struct.contexts = new java.util.ArrayList<RequestContext>(_list35.size);
RequestContext _elem36;
for (int _i37 = 0; _i37 < _list35.size; ++_i37)
{
_elem36 = new RequestContext();
_elem36.read(iprot);
struct.contexts.add(_elem36);
}
iprot.readListEnd();
}
struct.setContextsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}