in scrooge-generator/src/main/scala/com/twitter/scrooge/backend/Generator.scala [532:548]
def genDecodeProtocolMethod(t: FunctionType): CodeFragment = {
@scala.annotation.tailrec
def getCode(t: FunctionType): String = t match {
case at: AnnotatedFieldType => getCode(at.unwrap)
case TBool => "decodeBool"
case TByte => "decodeByte"
case TI16 => "decodeI16"
case TI32 => "decodeI32"
case TI64 => "decodeI64"
case TDouble => "decodeDouble"
case TString => "decodeString"
case TBinary => "decodeBinary"
case x =>
s"""Invalid type passed ($x) for genDecodeProtocolMethod method. Compile will fail here."""
}
v(getCode(t))
}