in scrooge-generator/src/main/scala/com/twitter/scrooge/backend/StructTemplate.scala [529:565]
private def buildPassthroughFields(fieldType: FieldType): Value = {
val overrides =
fieldType match {
case _: StructType =>
Dictionary(
"ptStruct" ->
v(
Dictionary(
"className" -> genType(fieldType)
)
)
)
case t: SetType =>
Dictionary(
"ptIter" ->
buildPassthroughFields(t.eltType)
)
case t: ListType =>
Dictionary(
"ptIter" ->
buildPassthroughFields(t.eltType)
)
case t: MapType =>
Dictionary(
"ptMap" ->
v(
Dictionary(
"ptKey" -> buildPassthroughFields(t.keyType),
"ptValue" -> buildPassthroughFields(t.valueType)
)
)
)
case _ => Dictionary("ptPrimitive" -> v(true))
}
v(basePassthrough + overrides)
}