diff options
author | Emil Lundberg <emil@emlun.se> | 2019-01-10 05:03:17 +0100 |
---|---|---|
committer | Emil Lundberg <emil@emlun.se> | 2019-01-13 02:26:56 +0100 |
commit | fe143bfd69f70749f4e745c5be6644c37840083f (patch) | |
tree | 900dac579c9d40bb13b6d6f3eda157f987c9eacc /src/core/lombok/javac/handlers/JavacSingularsRecipes.java | |
parent | 36653329e51cd478199a2d74da6ec5ee471d9cac (diff) | |
download | lombok-fe143bfd69f70749f4e745c5be6644c37840083f.tar.gz lombok-fe143bfd69f70749f4e745c5be6644c37840083f.tar.bz2 lombok-fe143bfd69f70749f4e745c5be6644c37840083f.zip |
Move invariant parameter inside finishAndInjectMethod
Diffstat (limited to 'src/core/lombok/javac/handlers/JavacSingularsRecipes.java')
-rw-r--r-- | src/core/lombok/javac/handlers/JavacSingularsRecipes.java | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/core/lombok/javac/handlers/JavacSingularsRecipes.java b/src/core/lombok/javac/handlers/JavacSingularsRecipes.java index a32a64be..69eaf97c 100644 --- a/src/core/lombok/javac/handlers/JavacSingularsRecipes.java +++ b/src/core/lombok/javac/handlers/JavacSingularsRecipes.java @@ -241,7 +241,8 @@ public class JavacSingularsRecipes { generateClearMethod(deprecate, maker, returnTypeMaker.make(), returnStatementMaker.make(), data, builderType, source); } - protected void finishAndInjectMethod(JavacTreeMaker maker, JCExpression returnType, JavacNode builderType, JCTree source, JCModifiers mods, JCBlock body, Name methodName, List<JCVariableDecl> jcVariableDecls) { + protected void finishAndInjectMethod(JavacTreeMaker maker, JCExpression returnType, JavacNode builderType, JCTree source, boolean deprecate, JCBlock body, Name methodName, List<JCVariableDecl> jcVariableDecls) { + JCModifiers mods = makeMods(maker, builderType, deprecate); List<JCTypeParameter> typeParams = List.nil(); List<JCExpression> thrown = List.nil(); JCMethodDecl method = maker.MethodDef(mods, methodName, returnType, typeParams, jcVariableDecls, thrown, body, null); @@ -258,8 +259,7 @@ public class JavacSingularsRecipes { JCBlock body = maker.Block(0, statements); Name methodName = builderType.toName(HandlerUtil.buildAccessorName("clear", data.getPluralName().toString())); - JCModifiers mods = makeMods(maker, builderType, deprecate); - finishAndInjectMethod(maker, returnType, builderType, source, mods, body, methodName, params); + finishAndInjectMethod(maker, returnType, builderType, source, deprecate, body, methodName, params); } protected abstract JCStatement generateClearStatements(JavacTreeMaker maker, SingularData data, JavacNode builderType); @@ -272,8 +272,7 @@ public class JavacSingularsRecipes { Name name = data.getSingularName(); if (!fluent) name = builderType.toName(HandlerUtil.buildAccessorName(getAddMethodName(), name.toString())); - JCModifiers mods = makeMods(maker, builderType, deprecate); - finishAndInjectMethod(maker, returnType, builderType, source, mods, body, name, params); + finishAndInjectMethod(maker, returnType, builderType, source, deprecate, body, name, params); } protected JCVariableDecl generateSingularMethodParameter(int typeIndex, JavacTreeMaker maker, SingularData data, JavacNode builderType, JCTree source, Name name) { |