From b565c6fe60511ceaf4e7df3d90134b628e62e1d3 Mon Sep 17 00:00:00 2001 From: sjaakd Date: Fri, 31 Jan 2014 22:25:41 +0100 Subject: [PATCH] #81 making use of template FactoryMethod.ftl --- .../main/resources/org.mapstruct.ap.model.BeanMappingMethod.ftl | 2 +- .../src/main/resources/org.mapstruct.ap.model.FactoryMethod.ftl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/processor/src/main/resources/org.mapstruct.ap.model.BeanMappingMethod.ftl b/processor/src/main/resources/org.mapstruct.ap.model.BeanMappingMethod.ftl index 789b6a409..00155f5d6 100644 --- a/processor/src/main/resources/org.mapstruct.ap.model.BeanMappingMethod.ftl +++ b/processor/src/main/resources/org.mapstruct.ap.model.BeanMappingMethod.ftl @@ -25,7 +25,7 @@ public <@includeModel object=returnType/> ${name}(<#list parameters as param><@i } <#if !existingInstanceMapping> - ${resultType.name} ${resultName} = <#if hasFactoryMethod><#if factoryMethod.hasDeclaringMapper>${factoryMethod.mapperVariableName}.${factoryMethod.name}()<#else>new ${resultType.name}(); + ${resultType.name} ${resultName} = <#if hasFactoryMethod><@includeModel object=factoryMethod/><#else>new ${resultType.name}(); <#if (sourceParameters?size > 1)> <#list sourceParameters as sourceParam> diff --git a/processor/src/main/resources/org.mapstruct.ap.model.FactoryMethod.ftl b/processor/src/main/resources/org.mapstruct.ap.model.FactoryMethod.ftl index c9b799180..fd5aa5a40 100644 --- a/processor/src/main/resources/org.mapstruct.ap.model.FactoryMethod.ftl +++ b/processor/src/main/resources/org.mapstruct.ap.model.FactoryMethod.ftl @@ -18,4 +18,4 @@ limitations under the License. --> -<#if declaringMapper??>${mapperVariableName}.${name}( ${ext.input} ) \ No newline at end of file +<#if hasDeclaringMapper>${mapperVariableName}.${name}() \ No newline at end of file