+ def private generateSetter(GeneratedProperty field) {
+ val returnType = field.returnType
+ if (returnType instanceof ParameterizedType) {
+ if (Types.isListType(returnType)) {
+ return generateListSetter(field, returnType.actualTypeArguments.get(0), "")
+ } else if (Types.isMapType(returnType)) {
+ return generateListSetter(field, returnType.actualTypeArguments.get(1), ".values()")
+ }
+ }
+ return generateSimpleSetter(field, returnType)
+ }
+
+ def private generateListSetter(GeneratedProperty field, Type actualType, String extractor) '''