diff --git a/processor/src/main/resources/org/mapstruct/tools/gem/processor/Gem.ftl b/processor/src/main/resources/org/mapstruct/tools/gem/processor/Gem.ftl index 0433d80..a73c81c 100644 --- a/processor/src/main/resources/org/mapstruct/tools/gem/processor/Gem.ftl +++ b/processor/src/main/resources/org/mapstruct/tools/gem/processor/Gem.ftl @@ -151,7 +151,7 @@ public class ${gemInfo.gemName} implements Gem { * * @return the {@link ${gemInfo.builderName}} for this gem, representing {@link ${gemInfo.gemName}} */ - ${gemInfo.builderName} set${gemValueInfo.name?capitalize}(GemValue<${gemValueInfo.valueType.name}> methodName ); + ${gemInfo.builderName} set${gemValueInfo.name?capitalize}(GemValue<${gemValueInfo.valueType.name}> methodName ); /** @@ -161,7 +161,7 @@ public class ${gemInfo.gemName} implements Gem { * * @return the {@link ${gemInfo.builderName}} for this gem, representing {@link ${gemInfo.gemName}} */ - ${gemInfo.builderName} setMirror( AnnotationMirror mirror ); + ${gemInfo.builderName} setMirror( AnnotationMirror mirror ); /** * The build method can be overriden in a custom custom implementation, which allows @@ -180,13 +180,13 @@ public class ${gemInfo.gemName} implements Gem { private AnnotationMirror mirror; <#list gemInfo.gemValueInfos as gemValueInfo> - public ${gemInfo.builderName} set${gemValueInfo.name?capitalize}(GemValue<${gemValueInfo.valueType.name}> ${gemValueInfo.name} ) { + public ${gemInfo.builderName}<${gemInfo.gemName}> set${gemValueInfo.name?capitalize}(GemValue<${gemValueInfo.valueType.name}> ${gemValueInfo.name} ) { this.${gemValueInfo.name} = ${gemValueInfo.name}; return this; } - public ${gemInfo.builderName} setMirror( AnnotationMirror mirror ) { + public ${gemInfo.builderName}<${gemInfo.gemName}> setMirror( AnnotationMirror mirror ) { this.mirror = mirror; return this; } diff --git a/processor/src/test/resources/fixtures/org/mapstruct/tools/gem/processor/BuilderGem.java b/processor/src/test/resources/fixtures/org/mapstruct/tools/gem/processor/BuilderGem.java index a43f216..0871576 100644 --- a/processor/src/test/resources/fixtures/org/mapstruct/tools/gem/processor/BuilderGem.java +++ b/processor/src/test/resources/fixtures/org/mapstruct/tools/gem/processor/BuilderGem.java @@ -78,7 +78,7 @@ public interface Builder_ { * * @return the {@link Builder_} for this gem, representing {@link BuilderGem} */ - Builder_ setMirror( AnnotationMirror mirror ); + Builder_ setMirror( AnnotationMirror mirror ); /** * The build method can be overriden in a custom custom implementation, which allows @@ -93,7 +93,7 @@ private static class BuilderImpl implements Builder_ { private AnnotationMirror mirror; - public Builder_ setMirror( AnnotationMirror mirror ) { + public Builder_ setMirror( AnnotationMirror mirror ) { this.mirror = mirror; return this; } diff --git a/processor/src/test/resources/fixtures/org/mapstruct/tools/gem/processor/SomeAnnotationGem.java b/processor/src/test/resources/fixtures/org/mapstruct/tools/gem/processor/SomeAnnotationGem.java index 1d030cc..36eef26 100644 --- a/processor/src/test/resources/fixtures/org/mapstruct/tools/gem/processor/SomeAnnotationGem.java +++ b/processor/src/test/resources/fixtures/org/mapstruct/tools/gem/processor/SomeAnnotationGem.java @@ -420,154 +420,154 @@ public interface Builder { * * @return the {@link Builder} for this gem, representing {@link SomeAnnotationGem} */ - Builder setMyclasswithdefault(GemValue methodName ); + Builder setMyclasswithdefault(GemValue methodName ); /** * Sets the {@link GemValue} for {@link SomeAnnotationGem#myBooleanWithDefault} * * @return the {@link Builder} for this gem, representing {@link SomeAnnotationGem} */ - Builder setMybooleanwithdefault(GemValue methodName ); + Builder setMybooleanwithdefault(GemValue methodName ); /** * Sets the {@link GemValue} for {@link SomeAnnotationGem#myCharWithDefault} * * @return the {@link Builder} for this gem, representing {@link SomeAnnotationGem} */ - Builder setMycharwithdefault(GemValue methodName ); + Builder setMycharwithdefault(GemValue methodName ); /** * Sets the {@link GemValue} for {@link SomeAnnotationGem#myByteWithDefault} * * @return the {@link Builder} for this gem, representing {@link SomeAnnotationGem} */ - Builder setMybytewithdefault(GemValue methodName ); + Builder setMybytewithdefault(GemValue methodName ); /** * Sets the {@link GemValue} for {@link SomeAnnotationGem#mShortWithDefault} * * @return the {@link Builder} for this gem, representing {@link SomeAnnotationGem} */ - Builder setMshortwithdefault(GemValue methodName ); + Builder setMshortwithdefault(GemValue methodName ); /** * Sets the {@link GemValue} for {@link SomeAnnotationGem#myIntWithDefault} * * @return the {@link Builder} for this gem, representing {@link SomeAnnotationGem} */ - Builder setMyintwithdefault(GemValue methodName ); + Builder setMyintwithdefault(GemValue methodName ); /** * Sets the {@link GemValue} for {@link SomeAnnotationGem#myLongWithDefault} * * @return the {@link Builder} for this gem, representing {@link SomeAnnotationGem} */ - Builder setMylongwithdefault(GemValue methodName ); + Builder setMylongwithdefault(GemValue methodName ); /** * Sets the {@link GemValue} for {@link SomeAnnotationGem#myFloatWithDefault} * * @return the {@link Builder} for this gem, representing {@link SomeAnnotationGem} */ - Builder setMyfloatwithdefault(GemValue methodName ); + Builder setMyfloatwithdefault(GemValue methodName ); /** * Sets the {@link GemValue} for {@link SomeAnnotationGem#myDoubleWithDefault} * * @return the {@link Builder} for this gem, representing {@link SomeAnnotationGem} */ - Builder setMydoublewithdefault(GemValue methodName ); + Builder setMydoublewithdefault(GemValue methodName ); /** * Sets the {@link GemValue} for {@link SomeAnnotationGem#myStringWithDefault} * * @return the {@link Builder} for this gem, representing {@link SomeAnnotationGem} */ - Builder setMystringwithdefault(GemValue methodName ); + Builder setMystringwithdefault(GemValue methodName ); /** * Sets the {@link GemValue} for {@link SomeAnnotationGem#myEnumWithDefault} * * @return the {@link Builder} for this gem, representing {@link SomeAnnotationGem} */ - Builder setMyenumwithdefault(GemValue methodName ); + Builder setMyenumwithdefault(GemValue methodName ); /** * Sets the {@link GemValue} for {@link SomeAnnotationGem#myClass} * * @return the {@link Builder} for this gem, representing {@link SomeAnnotationGem} */ - Builder setMyclass(GemValue methodName ); + Builder setMyclass(GemValue methodName ); /** * Sets the {@link GemValue} for {@link SomeAnnotationGem#myBoolean} * * @return the {@link Builder} for this gem, representing {@link SomeAnnotationGem} */ - Builder setMyboolean(GemValue methodName ); + Builder setMyboolean(GemValue methodName ); /** * Sets the {@link GemValue} for {@link SomeAnnotationGem#myChar} * * @return the {@link Builder} for this gem, representing {@link SomeAnnotationGem} */ - Builder setMychar(GemValue methodName ); + Builder setMychar(GemValue methodName ); /** * Sets the {@link GemValue} for {@link SomeAnnotationGem#myByte} * * @return the {@link Builder} for this gem, representing {@link SomeAnnotationGem} */ - Builder setMybyte(GemValue methodName ); + Builder setMybyte(GemValue methodName ); /** * Sets the {@link GemValue} for {@link SomeAnnotationGem#myShort} * * @return the {@link Builder} for this gem, representing {@link SomeAnnotationGem} */ - Builder setMyshort(GemValue methodName ); + Builder setMyshort(GemValue methodName ); /** * Sets the {@link GemValue} for {@link SomeAnnotationGem#myInt} * * @return the {@link Builder} for this gem, representing {@link SomeAnnotationGem} */ - Builder setMyint(GemValue methodName ); + Builder setMyint(GemValue methodName ); /** * Sets the {@link GemValue} for {@link SomeAnnotationGem#myLong} * * @return the {@link Builder} for this gem, representing {@link SomeAnnotationGem} */ - Builder setMylong(GemValue methodName ); + Builder setMylong(GemValue methodName ); /** * Sets the {@link GemValue} for {@link SomeAnnotationGem#myFloat} * * @return the {@link Builder} for this gem, representing {@link SomeAnnotationGem} */ - Builder setMyfloat(GemValue methodName ); + Builder setMyfloat(GemValue methodName ); /** * Sets the {@link GemValue} for {@link SomeAnnotationGem#myDouble} * * @return the {@link Builder} for this gem, representing {@link SomeAnnotationGem} */ - Builder setMydouble(GemValue methodName ); + Builder setMydouble(GemValue methodName ); /** * Sets the {@link GemValue} for {@link SomeAnnotationGem#myString} * * @return the {@link Builder} for this gem, representing {@link SomeAnnotationGem} */ - Builder setMystring(GemValue methodName ); + Builder setMystring(GemValue methodName ); /** * Sets the {@link GemValue} for {@link SomeAnnotationGem#myEnum} * * @return the {@link Builder} for this gem, representing {@link SomeAnnotationGem} */ - Builder setMyenum(GemValue methodName ); + Builder setMyenum(GemValue methodName ); /** * Sets the annotation mirror @@ -576,7 +576,7 @@ public interface Builder { * * @return the {@link Builder} for this gem, representing {@link SomeAnnotationGem} */ - Builder setMirror( AnnotationMirror mirror ); + Builder setMirror( AnnotationMirror mirror ); /** * The build method can be overriden in a custom custom implementation, which allows @@ -613,117 +613,117 @@ private static class BuilderImpl implements Builder { private GemValue myEnum; private AnnotationMirror mirror; - public Builder setMyclasswithdefault(GemValue myClassWithDefault ) { + public Builder setMyclasswithdefault(GemValue myClassWithDefault ) { this.myClassWithDefault = myClassWithDefault; return this; } - public Builder setMybooleanwithdefault(GemValue myBooleanWithDefault ) { + public Builder setMybooleanwithdefault(GemValue myBooleanWithDefault ) { this.myBooleanWithDefault = myBooleanWithDefault; return this; } - public Builder setMycharwithdefault(GemValue myCharWithDefault ) { + public Builder setMycharwithdefault(GemValue myCharWithDefault ) { this.myCharWithDefault = myCharWithDefault; return this; } - public Builder setMybytewithdefault(GemValue myByteWithDefault ) { + public Builder setMybytewithdefault(GemValue myByteWithDefault ) { this.myByteWithDefault = myByteWithDefault; return this; } - public Builder setMshortwithdefault(GemValue mShortWithDefault ) { + public Builder setMshortwithdefault(GemValue mShortWithDefault ) { this.mShortWithDefault = mShortWithDefault; return this; } - public Builder setMyintwithdefault(GemValue myIntWithDefault ) { + public Builder setMyintwithdefault(GemValue myIntWithDefault ) { this.myIntWithDefault = myIntWithDefault; return this; } - public Builder setMylongwithdefault(GemValue myLongWithDefault ) { + public Builder setMylongwithdefault(GemValue myLongWithDefault ) { this.myLongWithDefault = myLongWithDefault; return this; } - public Builder setMyfloatwithdefault(GemValue myFloatWithDefault ) { + public Builder setMyfloatwithdefault(GemValue myFloatWithDefault ) { this.myFloatWithDefault = myFloatWithDefault; return this; } - public Builder setMydoublewithdefault(GemValue myDoubleWithDefault ) { + public Builder setMydoublewithdefault(GemValue myDoubleWithDefault ) { this.myDoubleWithDefault = myDoubleWithDefault; return this; } - public Builder setMystringwithdefault(GemValue myStringWithDefault ) { + public Builder setMystringwithdefault(GemValue myStringWithDefault ) { this.myStringWithDefault = myStringWithDefault; return this; } - public Builder setMyenumwithdefault(GemValue myEnumWithDefault ) { + public Builder setMyenumwithdefault(GemValue myEnumWithDefault ) { this.myEnumWithDefault = myEnumWithDefault; return this; } - public Builder setMyclass(GemValue myClass ) { + public Builder setMyclass(GemValue myClass ) { this.myClass = myClass; return this; } - public Builder setMyboolean(GemValue myBoolean ) { + public Builder setMyboolean(GemValue myBoolean ) { this.myBoolean = myBoolean; return this; } - public Builder setMychar(GemValue myChar ) { + public Builder setMychar(GemValue myChar ) { this.myChar = myChar; return this; } - public Builder setMybyte(GemValue myByte ) { + public Builder setMybyte(GemValue myByte ) { this.myByte = myByte; return this; } - public Builder setMyshort(GemValue myShort ) { + public Builder setMyshort(GemValue myShort ) { this.myShort = myShort; return this; } - public Builder setMyint(GemValue myInt ) { + public Builder setMyint(GemValue myInt ) { this.myInt = myInt; return this; } - public Builder setMylong(GemValue myLong ) { + public Builder setMylong(GemValue myLong ) { this.myLong = myLong; return this; } - public Builder setMyfloat(GemValue myFloat ) { + public Builder setMyfloat(GemValue myFloat ) { this.myFloat = myFloat; return this; } - public Builder setMydouble(GemValue myDouble ) { + public Builder setMydouble(GemValue myDouble ) { this.myDouble = myDouble; return this; } - public Builder setMystring(GemValue myString ) { + public Builder setMystring(GemValue myString ) { this.myString = myString; return this; } - public Builder setMyenum(GemValue myEnum ) { + public Builder setMyenum(GemValue myEnum ) { this.myEnum = myEnum; return this; } - public Builder setMirror( AnnotationMirror mirror ) { + public Builder setMirror( AnnotationMirror mirror ) { this.mirror = mirror; return this; } diff --git a/processor/src/test/resources/fixtures/org/mapstruct/tools/gem/processor/SomeAnnotationsGem.java b/processor/src/test/resources/fixtures/org/mapstruct/tools/gem/processor/SomeAnnotationsGem.java index 83ab83e..2874139 100644 --- a/processor/src/test/resources/fixtures/org/mapstruct/tools/gem/processor/SomeAnnotationsGem.java +++ b/processor/src/test/resources/fixtures/org/mapstruct/tools/gem/processor/SomeAnnotationsGem.java @@ -104,7 +104,7 @@ public interface Builder { * * @return the {@link Builder} for this gem, representing {@link SomeAnnotationsGem} */ - Builder setValue(GemValue> methodName ); + Builder setValue(GemValue> methodName ); /** * Sets the annotation mirror @@ -113,7 +113,7 @@ public interface Builder { * * @return the {@link Builder} for this gem, representing {@link SomeAnnotationsGem} */ - Builder setMirror( AnnotationMirror mirror ); + Builder setMirror( AnnotationMirror mirror ); /** * The build method can be overriden in a custom custom implementation, which allows @@ -129,12 +129,12 @@ private static class BuilderImpl implements Builder { private GemValue> value; private AnnotationMirror mirror; - public Builder setValue(GemValue> value ) { + public Builder setValue(GemValue> value ) { this.value = value; return this; } - public Builder setMirror( AnnotationMirror mirror ) { + public Builder setMirror( AnnotationMirror mirror ) { this.mirror = mirror; return this; } diff --git a/processor/src/test/resources/fixtures/org/mapstruct/tools/gem/processor/SomeArrayAnnotationGem.java b/processor/src/test/resources/fixtures/org/mapstruct/tools/gem/processor/SomeArrayAnnotationGem.java index dfb0a81..f4083c2 100644 --- a/processor/src/test/resources/fixtures/org/mapstruct/tools/gem/processor/SomeArrayAnnotationGem.java +++ b/processor/src/test/resources/fixtures/org/mapstruct/tools/gem/processor/SomeArrayAnnotationGem.java @@ -150,28 +150,28 @@ public interface Builder { * * @return the {@link Builder} for this gem, representing {@link SomeArrayAnnotationGem} */ - Builder setMyclasswithdefault(GemValue> methodName ); + Builder setMyclasswithdefault(GemValue> methodName ); /** * Sets the {@link GemValue} for {@link SomeArrayAnnotationGem#myBooleanWithDefault} * * @return the {@link Builder} for this gem, representing {@link SomeArrayAnnotationGem} */ - Builder setMybooleanwithdefault(GemValue> methodName ); + Builder setMybooleanwithdefault(GemValue> methodName ); /** * Sets the {@link GemValue} for {@link SomeArrayAnnotationGem#myEnumWithDefault} * * @return the {@link Builder} for this gem, representing {@link SomeArrayAnnotationGem} */ - Builder setMyenumwithdefault(GemValue> methodName ); + Builder setMyenumwithdefault(GemValue> methodName ); /** * Sets the {@link GemValue} for {@link SomeArrayAnnotationGem#myAnnotation} * * @return the {@link Builder} for this gem, representing {@link SomeArrayAnnotationGem} */ - Builder setMyannotation(GemValue methodName ); + Builder setMyannotation(GemValue methodName ); /** * Sets the annotation mirror @@ -180,7 +180,7 @@ public interface Builder { * * @return the {@link Builder} for this gem, representing {@link SomeArrayAnnotationGem} */ - Builder setMirror( AnnotationMirror mirror ); + Builder setMirror( AnnotationMirror mirror ); /** * The build method can be overriden in a custom custom implementation, which allows @@ -199,27 +199,27 @@ private static class BuilderImpl implements Builder { private GemValue myAnnotation; private AnnotationMirror mirror; - public Builder setMyclasswithdefault(GemValue> myClassWithDefault ) { + public Builder setMyclasswithdefault(GemValue> myClassWithDefault ) { this.myClassWithDefault = myClassWithDefault; return this; } - public Builder setMybooleanwithdefault(GemValue> myBooleanWithDefault ) { + public Builder setMybooleanwithdefault(GemValue> myBooleanWithDefault ) { this.myBooleanWithDefault = myBooleanWithDefault; return this; } - public Builder setMyenumwithdefault(GemValue> myEnumWithDefault ) { + public Builder setMyenumwithdefault(GemValue> myEnumWithDefault ) { this.myEnumWithDefault = myEnumWithDefault; return this; } - public Builder setMyannotation(GemValue myAnnotation ) { + public Builder setMyannotation(GemValue myAnnotation ) { this.myAnnotation = myAnnotation; return this; } - public Builder setMirror( AnnotationMirror mirror ) { + public Builder setMirror( AnnotationMirror mirror ) { this.mirror = mirror; return this; }