in scrooge-generator/src/main/scala/com/twitter/scrooge/backend/StructTemplate.scala [221:237]
private[this] def genReadValueFn1(fieldType: FieldType): CodeFragment = {
fieldType match {
case at: AnnotatedFieldType => genReadValueFn1(at.unwrap)
case TBool => v("_root_.com.twitter.scrooge.internal.TProtocols.readBoolFn")
case TByte => v("_root_.com.twitter.scrooge.internal.TProtocols.readByteFn")
case TI16 => v("_root_.com.twitter.scrooge.internal.TProtocols.readI16Fn")
case TI32 => v("_root_.com.twitter.scrooge.internal.TProtocols.readI32Fn")
case TI64 => v("_root_.com.twitter.scrooge.internal.TProtocols.readI64Fn")
case TDouble => v("_root_.com.twitter.scrooge.internal.TProtocols.readDoubleFn")
case TString => v("_root_.com.twitter.scrooge.internal.TProtocols.readStringFn")
case TBinary => v("_root_.com.twitter.scrooge.internal.TProtocols.readBinaryFn")
case _: StructType => genType(fieldType).append(s".decode _")
case _ =>
val readElem = genReadValue(fieldType, "proto")
v(s"proto => { $readElem }")
}
}