aboutsummaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/lombok/javac/handlers/singulars/JavacGuavaSingularizer.java3
-rw-r--r--src/core/lombok/javac/handlers/singulars/JavacJavaUtilListSetSingularizer.java3
-rw-r--r--src/core/lombok/javac/handlers/singulars/JavacJavaUtilMapSingularizer.java3
3 files changed, 6 insertions, 3 deletions
diff --git a/src/core/lombok/javac/handlers/singulars/JavacGuavaSingularizer.java b/src/core/lombok/javac/handlers/singulars/JavacGuavaSingularizer.java
index 7f610b79..25fc8751 100644
--- a/src/core/lombok/javac/handlers/singulars/JavacGuavaSingularizer.java
+++ b/src/core/lombok/javac/handlers/singulars/JavacGuavaSingularizer.java
@@ -108,10 +108,11 @@ abstract class JavacGuavaSingularizer extends JavacSingularizer {
params.append(generateSingularMethodParameter(i, maker, data, builderType, source, names[i]));
}
+ String addMethodName = getAddMethodName();
if (returnStatement != null) statements.append(returnStatement);
JCBlock body = maker.Block(0, statements.toList());
Name methodName = data.getSingularName();
- if (!fluent) methodName = builderType.toName(HandlerUtil.buildAccessorName(getAddMethodName(), methodName.toString()));
+ if (!fluent) methodName = builderType.toName(HandlerUtil.buildAccessorName(addMethodName, methodName.toString()));
finishAndInjectMethod(maker, returnType, builderType, source, mods, body, methodName, params.toList());
}
diff --git a/src/core/lombok/javac/handlers/singulars/JavacJavaUtilListSetSingularizer.java b/src/core/lombok/javac/handlers/singulars/JavacJavaUtilListSetSingularizer.java
index 441f9eda..981f40cd 100644
--- a/src/core/lombok/javac/handlers/singulars/JavacJavaUtilListSetSingularizer.java
+++ b/src/core/lombok/javac/handlers/singulars/JavacJavaUtilListSetSingularizer.java
@@ -106,10 +106,11 @@ abstract class JavacJavaUtilListSetSingularizer extends JavacJavaUtilSingularize
JCVariableDecl param = generateSingularMethodParameter(0, maker, data, builderType, source, data.getSingularName());
List<JCVariableDecl> params = List.of(param);
+ String addMethodName = "add";
if (returnStatement != null) statements.append(returnStatement);
JCBlock body = maker.Block(0, statements.toList());
Name name = data.getSingularName();
- if (!fluent) name = builderType.toName(HandlerUtil.buildAccessorName("add", name.toString()));
+ if (!fluent) name = builderType.toName(HandlerUtil.buildAccessorName(addMethodName, name.toString()));
finishAndInjectMethod(maker, returnType, builderType, source, mods, body, name, params);
}
diff --git a/src/core/lombok/javac/handlers/singulars/JavacJavaUtilMapSingularizer.java b/src/core/lombok/javac/handlers/singulars/JavacJavaUtilMapSingularizer.java
index 5ecbee8a..a7859ce6 100644
--- a/src/core/lombok/javac/handlers/singulars/JavacJavaUtilMapSingularizer.java
+++ b/src/core/lombok/javac/handlers/singulars/JavacJavaUtilMapSingularizer.java
@@ -141,10 +141,11 @@ public class JavacJavaUtilMapSingularizer extends JavacJavaUtilSingularizer {
JCVariableDecl paramValue = generateSingularMethodParameter(1, maker, data, builderType, source, valueName);
List<JCVariableDecl> params = List.of(paramKey, paramValue);
+ String addMethodName = "put";
if (returnStatement != null) statements.append(returnStatement);
JCBlock body = maker.Block(0, statements.toList());
Name name = data.getSingularName();
- if (!fluent) name = builderType.toName(HandlerUtil.buildAccessorName("put", name.toString()));
+ if (!fluent) name = builderType.toName(HandlerUtil.buildAccessorName(addMethodName, name.toString()));
finishAndInjectMethod(maker, returnType, builderType, source, mods, body, name, params);
}