mirror of
https://github.com/mapstruct/mapstruct.git
synced 2025-07-12 00:00:08 +08:00
#191 extend delegate template to avoid duplicate mapper instantiation
This commit is contained in:
parent
a8b153d980
commit
9711d5615e
@ -19,8 +19,12 @@
|
|||||||
|
|
||||||
-->
|
-->
|
||||||
public ${name}() {
|
public ${name}() {
|
||||||
<#if invokeSuperConstructor>
|
this( new ${delegateName}() );
|
||||||
super( new ${delegateName}() );
|
}
|
||||||
</#if>
|
|
||||||
this.delegate = new ${delegateName}();
|
private ${name}( ${delegateName} delegate ) {
|
||||||
|
<#if invokeSuperConstructor>
|
||||||
|
super( delegate );
|
||||||
|
</#if>
|
||||||
|
this.delegate = delegate;
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user