diff --git a/processor/src/main/resources/org.mapstruct.ap.model.IterableMappingMethod.ftl b/processor/src/main/resources/org.mapstruct.ap.model.IterableMappingMethod.ftl index c26c91fd0..dced2ff33 100644 --- a/processor/src/main/resources/org.mapstruct.ap.model.IterableMappingMethod.ftl +++ b/processor/src/main/resources/org.mapstruct.ap.model.IterableMappingMethod.ftl @@ -32,7 +32,7 @@ for ( <@includeModel object=sourceParameter.type.typeParameters[0]/> ${loopVariableName} : ${sourceParameter.name} ) { - <@includeModel object=elementAssignment targetBeanName=resultName targetAccessorName="add" targetType="${resultType.typeParameters[0].name}"/> + <@includeModel object=elementAssignment targetBeanName=resultName targetAccessorName="add" targetType=resultType.typeParameters[0]/> } <#if returnType.name != "void"> diff --git a/processor/src/main/resources/org.mapstruct.ap.model.MapMappingMethod.ftl b/processor/src/main/resources/org.mapstruct.ap.model.MapMappingMethod.ftl index c740886dc..59c2fcaad 100644 --- a/processor/src/main/resources/org.mapstruct.ap.model.MapMappingMethod.ftl +++ b/processor/src/main/resources/org.mapstruct.ap.model.MapMappingMethod.ftl @@ -35,12 +35,12 @@ <#-- key --> <@includeModel object=keyAssignment targetAccessorName=keyVariableName - targetType=typeName(resultType.typeParameters[0]) + targetType=resultType.typeParameters[0] isLocalVar=true/> <#-- value --> <@includeModel object=valueAssignment targetAccessorName=valueVariableName - targetType=typeName(resultType.typeParameters[1]) + targetType=resultType.typeParameters[1] isLocalVar=true/> ${resultName}.put( ${keyVariableName}, ${valueVariableName} ); } @@ -49,10 +49,6 @@ return ${resultName}; } -<#function typeName type> - <#local result><@includeModel object=type/> - <#return result> - <#macro throws> <@compress single_line=true> <#if (thrownTypes?size > 0)>throws diff --git a/processor/src/main/resources/org.mapstruct.ap.model.assignment.MethodReference.ftl b/processor/src/main/resources/org.mapstruct.ap.model.assignment.MethodReference.ftl index 3b5b72f1d..afd583f31 100644 --- a/processor/src/main/resources/org.mapstruct.ap.model.assignment.MethodReference.ftl +++ b/processor/src/main/resources/org.mapstruct.ap.model.assignment.MethodReference.ftl @@ -25,7 +25,7 @@ <#list parameters as param> <#if param.targetType> <#-- a class is passed on for casting, see @TargetType --> - ${ext.targetType}.class + <@includeModel object=ext.targetType/>.class <#else> <@includeModel object=assignment targetType=singleSourceParameterType raw=ext.raw/>