def genOffsetSkipProtocolMethod()

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


  def genOffsetSkipProtocolMethod(t: FunctionType): CodeFragment = {
    @scala.annotation.tailrec
    def getCode(t: FunctionType): String = t match {
      case at: AnnotatedFieldType => getCode(at.unwrap)
      case TBool => "offsetSkipBool"
      case TByte => "offsetSkipByte"
      case TI16 => "offsetSkipI16"
      case TI32 => "offsetSkipI32"
      case TI64 => "offsetSkipI64"
      case TDouble => "offsetSkipDouble"
      case TString => "offsetSkipString"
      case TBinary => "offsetSkipBinary"
      case x =>
        s"""Invalid type passed($x) for genOffsetSkipProtocolMethod method. Compile will fail here."""
    }
    v(getCode(t))
  }