diff options
author | Caleb Brinkman <cbrinkman@sonatype.com> | 2019-10-28 12:43:43 -0500 |
---|---|---|
committer | Caleb Brinkman <cbrinkman@sonatype.com> | 2019-10-28 12:43:43 -0500 |
commit | 2a7afbc1d1f450dec98b224ffd990a7a972d770a (patch) | |
tree | 20226c1229c885f7e0fe1f050093f48e66db8739 /src/core/lombok/eclipse/handlers/singulars | |
parent | 7a8bc61bae5f807887bce9a2cbfaed8afea8a588 (diff) | |
download | lombok-2a7afbc1d1f450dec98b224ffd990a7a972d770a.tar.gz lombok-2a7afbc1d1f450dec98b224ffd990a7a972d770a.tar.bz2 lombok-2a7afbc1d1f450dec98b224ffd990a7a972d770a.zip |
Fix more singulars and tests
Diffstat (limited to 'src/core/lombok/eclipse/handlers/singulars')
-rwxr-xr-x | src/core/lombok/eclipse/handlers/singulars/EclipseGuavaSingularizer.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/lombok/eclipse/handlers/singulars/EclipseGuavaSingularizer.java b/src/core/lombok/eclipse/handlers/singulars/EclipseGuavaSingularizer.java index 338f5eab..8f80d228 100755 --- a/src/core/lombok/eclipse/handlers/singulars/EclipseGuavaSingularizer.java +++ b/src/core/lombok/eclipse/handlers/singulars/EclipseGuavaSingularizer.java @@ -172,7 +172,8 @@ abstract class EclipseGuavaSingularizer extends EclipseSingularizer { md.arguments[i].annotations = typeUseAnns; } md.returnType = returnType; - md.selector = fluent ? data.getSingularName() : HandlerUtil.buildAccessorName(getAddMethodName(), new String(data.getSingularName())).toCharArray(); + char[] prefixedSingularName = data.getSetterPrefix().length == 0 ? data.getSingularName() : HandlerUtil.buildAccessorName(new String(data.getSetterPrefix()), new String(data.getSingularName())).toCharArray(); + md.selector = fluent ? prefixedSingularName : HandlerUtil.buildAccessorName("add", new String(data.getSingularName())).toCharArray(); md.annotations = generateSelfReturnAnnotations(deprecate, cfv, data.getSource()); data.setGeneratedByRecursive(md); @@ -204,7 +205,8 @@ abstract class EclipseGuavaSingularizer extends EclipseSingularizer { Argument param = new Argument(data.getPluralName(), 0, paramType, ClassFileConstants.AccFinal); md.arguments = new Argument[] {param}; md.returnType = returnType; - md.selector = fluent ? data.getPluralName() : HandlerUtil.buildAccessorName(getAddMethodName() + "All", new String(data.getPluralName())).toCharArray(); + char[] prefixedSelector = data.getSetterPrefix().length == 0 ? data.getPluralName() : HandlerUtil.buildAccessorName(new String(data.getSetterPrefix()), new String(data.getPluralName())).toCharArray(); + md.selector = fluent ? prefixedSelector : HandlerUtil.buildAccessorName("addAll", new String(data.getPluralName())).toCharArray(); md.annotations = generateSelfReturnAnnotations(deprecate, cfv, data.getSource()); data.setGeneratedByRecursive(md); |