aboutsummaryrefslogtreecommitdiff
path: root/src/core/lombok/javac
diff options
context:
space:
mode:
authorEmil Lundberg <emil@emlun.se>2019-01-10 04:23:24 +0100
committerEmil Lundberg <emil@emlun.se>2019-01-13 02:25:26 +0100
commit73a70e3332230170a11657610417f6d62a269643 (patch)
tree511180585e58c4f9d79dac63737734c007777fa4 /src/core/lombok/javac
parent0c20da8e0e19e6db37c4c9d0de05d784e472c258 (diff)
downloadlombok-73a70e3332230170a11657610417f6d62a269643.tar.gz
lombok-73a70e3332230170a11657610417f6d62a269643.tar.bz2
lombok-73a70e3332230170a11657610417f6d62a269643.zip
Move invariant parameter inside finishAndInjectSingularMethod
Diffstat (limited to 'src/core/lombok/javac')
-rw-r--r--src/core/lombok/javac/handlers/JavacSingularsRecipes.java3
-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
4 files changed, 5 insertions, 7 deletions
diff --git a/src/core/lombok/javac/handlers/JavacSingularsRecipes.java b/src/core/lombok/javac/handlers/JavacSingularsRecipes.java
index ad8f978a..1546e523 100644
--- a/src/core/lombok/javac/handlers/JavacSingularsRecipes.java
+++ b/src/core/lombok/javac/handlers/JavacSingularsRecipes.java
@@ -281,7 +281,8 @@ public class JavacSingularsRecipes {
return maker.Exec(invokeAdd);
}
- protected void finishAndInjectSingularMethod(JavacTreeMaker maker, JCExpression returnType, JCStatement returnStatement, SingularData data, JavacNode builderType, JCTree source, boolean fluent, JCModifiers mods, ListBuffer<JCStatement> statements, List<JCVariableDecl> params, String addMethodName) {
+ protected void finishAndInjectSingularMethod(JavacTreeMaker maker, JCExpression returnType, JCStatement returnStatement, SingularData data, JavacNode builderType, JCTree source, boolean fluent, boolean deprecate, ListBuffer<JCStatement> statements, List<JCVariableDecl> params, String addMethodName) {
+ JCModifiers mods = makeMods(maker, builderType, deprecate);
if (returnStatement != null) statements.append(returnStatement);
JCBlock body = maker.Block(0, statements.toList());
Name name = data.getSingularName();
diff --git a/src/core/lombok/javac/handlers/singulars/JavacGuavaSingularizer.java b/src/core/lombok/javac/handlers/singulars/JavacGuavaSingularizer.java
index 97329f78..9d5264c4 100644
--- a/src/core/lombok/javac/handlers/singulars/JavacGuavaSingularizer.java
+++ b/src/core/lombok/javac/handlers/singulars/JavacGuavaSingularizer.java
@@ -107,8 +107,7 @@ abstract class JavacGuavaSingularizer extends JavacSingularizer {
params.append(generateSingularMethodParameter(i, maker, data, builderType, source, names[i]));
}
- JCModifiers mods = makeMods(maker, builderType, deprecate);
- finishAndInjectSingularMethod(maker, returnType, returnStatement, data, builderType, source, fluent, mods, statements, params.toList(), getAddMethodName());
+ finishAndInjectSingularMethod(maker, returnType, returnStatement, data, builderType, source, fluent, deprecate, statements, params.toList(), getAddMethodName());
}
@Override
diff --git a/src/core/lombok/javac/handlers/singulars/JavacJavaUtilListSetSingularizer.java b/src/core/lombok/javac/handlers/singulars/JavacJavaUtilListSetSingularizer.java
index 76c58678..182bf78a 100644
--- a/src/core/lombok/javac/handlers/singulars/JavacJavaUtilListSetSingularizer.java
+++ b/src/core/lombok/javac/handlers/singulars/JavacJavaUtilListSetSingularizer.java
@@ -105,8 +105,7 @@ abstract class JavacJavaUtilListSetSingularizer extends JavacJavaUtilSingularize
JCVariableDecl param = generateSingularMethodParameter(0, maker, data, builderType, source, data.getSingularName());
List<JCVariableDecl> params = List.of(param);
- JCModifiers mods = makeMods(maker, builderType, deprecate);
- finishAndInjectSingularMethod(maker, returnType, returnStatement, data, builderType, source, fluent, mods, statements, params, "add");
+ finishAndInjectSingularMethod(maker, returnType, returnStatement, data, builderType, source, fluent, deprecate, statements, params, "add");
}
@Override
diff --git a/src/core/lombok/javac/handlers/singulars/JavacJavaUtilMapSingularizer.java b/src/core/lombok/javac/handlers/singulars/JavacJavaUtilMapSingularizer.java
index 6add2fcb..255bb63a 100644
--- a/src/core/lombok/javac/handlers/singulars/JavacJavaUtilMapSingularizer.java
+++ b/src/core/lombok/javac/handlers/singulars/JavacJavaUtilMapSingularizer.java
@@ -139,8 +139,7 @@ public class JavacJavaUtilMapSingularizer extends JavacJavaUtilSingularizer {
JCVariableDecl paramValue = generateSingularMethodParameter(1, maker, data, builderType, source, valueName);
List<JCVariableDecl> params = List.of(paramKey, paramValue);
- JCModifiers mods = makeMods(maker, builderType, deprecate);
- finishAndInjectSingularMethod(maker, returnType, returnStatement, data, builderType, source, fluent, mods, statements, params, "put");
+ finishAndInjectSingularMethod(maker, returnType, returnStatement, data, builderType, source, fluent, deprecate, statements, params, "put");
}
@Override