mirror of
https://github.com/mapstruct/mapstruct.git
synced 2025-07-12 00:00:08 +08:00
#81 making use of template FactoryMethod.ftl
This commit is contained in:
parent
c3df6d8572
commit
b565c6fe60
@ -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}.</#if>${factoryMethod.name}()<#else>new ${resultType.name}()</#if>;
|
||||
${resultType.name} ${resultName} = <#if hasFactoryMethod><@includeModel object=factoryMethod/><#else>new ${resultType.name}()</#if>;
|
||||
</#if>
|
||||
<#if (sourceParameters?size > 1)>
|
||||
<#list sourceParameters as sourceParam>
|
||||
|
@ -18,4 +18,4 @@
|
||||
limitations under the License.
|
||||
|
||||
-->
|
||||
<#if declaringMapper??>${mapperVariableName}.</#if>${name}( ${ext.input} )
|
||||
<#if hasDeclaringMapper>${mapperVariableName}.</#if>${name}()
|
Loading…
x
Reference in New Issue
Block a user