def genProtocolReadMethod()

in scrooge-generator/src/main/scala/com/twitter/scrooge/backend/Generator.scala [480:495]


  def genProtocolReadMethod(t: FunctionType): CodeFragment = {
    @scala.annotation.tailrec
    def getCode(t: FunctionType): String = t match {
      case at: AnnotatedFieldType => getCode(at.unwrap)
      case TBool => "readBool"
      case TByte => "readByte"
      case TI16 => "readI16"
      case TI32 => "readI32"
      case TI64 => "readI64"
      case TDouble => "readDouble"
      case TString => "readString"
      case TBinary => "readBinary"
      case x => throw new ScroogeInternalException("genProtocolReadMethod#" + t)
    }
    v(getCode(t))
  }