aboutsummaryrefslogtreecommitdiff
path: root/src/core/lombok/javac/handlers/singulars
diff options
context:
space:
mode:
authorEmil Lundberg <emil@emlun.se>2019-01-10 02:35:30 +0100
committerEmil Lundberg <emil@emlun.se>2019-01-13 02:13:56 +0100
commit360c1d5a21273793ef5c96c21b979501bdebb5c3 (patch)
tree62a02d16fc78ed8a88d8f6d850ffae78263ab966 /src/core/lombok/javac/handlers/singulars
parentbb7b5cce75988b0d774152a6f4d7b56ac1ab3953 (diff)
downloadlombok-360c1d5a21273793ef5c96c21b979501bdebb5c3.tar.gz
lombok-360c1d5a21273793ef5c96c21b979501bdebb5c3.tar.bz2
lombok-360c1d5a21273793ef5c96c21b979501bdebb5c3.zip
Move invariant parameters inside finishAndInjectMethod
Diffstat (limited to 'src/core/lombok/javac/handlers/singulars')
-rw-r--r--src/core/lombok/javac/handlers/singulars/JavacGuavaSingularizer.java8
-rw-r--r--src/core/lombok/javac/handlers/singulars/JavacJavaUtilListSetSingularizer.java8
-rw-r--r--src/core/lombok/javac/handlers/singulars/JavacJavaUtilMapSingularizer.java7
3 files changed, 6 insertions, 17 deletions
diff --git a/src/core/lombok/javac/handlers/singulars/JavacGuavaSingularizer.java b/src/core/lombok/javac/handlers/singulars/JavacGuavaSingularizer.java
index 9141482f..b514ebd5 100644
--- a/src/core/lombok/javac/handlers/singulars/JavacGuavaSingularizer.java
+++ b/src/core/lombok/javac/handlers/singulars/JavacGuavaSingularizer.java
@@ -117,9 +117,7 @@ abstract class JavacGuavaSingularizer extends JavacSingularizer {
params.append(p);
}
- List<JCTypeParameter> typeParams = List.nil();
- List<JCExpression> thrown = List.nil();
- finishAndInjectMethod(maker, returnType, builderType, source, typeParams, thrown, mods, body, methodName, params.toList());
+ finishAndInjectMethod(maker, returnType, builderType, source, mods, body, methodName, params.toList());
}
@Override
@@ -144,9 +142,7 @@ abstract class JavacGuavaSingularizer extends JavacSingularizer {
}
paramType = addTypeArgs(getTypeArgumentsCount(), true, builderType, paramType, data.getTypeArgs(), source);
JCVariableDecl param = maker.VarDef(maker.Modifiers(paramFlags), data.getPluralName(), paramType, null);
- List<JCTypeParameter> typeParams = List.nil();
- List<JCExpression> thrown = List.nil();
- finishAndInjectMethod(maker, returnType, builderType, source, typeParams, thrown, mods, body, methodName, List.of(param));
+ finishAndInjectMethod(maker, returnType, builderType, source, mods, body, methodName, List.of(param));
}
@Override public void appendBuildCode(SingularData data, JavacNode builderType, JCTree source, ListBuffer<JCStatement> statements, Name targetVariableName, String builderVariable) {
diff --git a/src/core/lombok/javac/handlers/singulars/JavacJavaUtilListSetSingularizer.java b/src/core/lombok/javac/handlers/singulars/JavacJavaUtilListSetSingularizer.java
index ba73d392..1b661bb2 100644
--- a/src/core/lombok/javac/handlers/singulars/JavacJavaUtilListSetSingularizer.java
+++ b/src/core/lombok/javac/handlers/singulars/JavacJavaUtilListSetSingularizer.java
@@ -116,9 +116,7 @@ abstract class JavacJavaUtilListSetSingularizer extends JavacJavaUtilSingularize
paramType = removeTypeUseAnnotations(paramType);
JCModifiers paramMods = typeUseAnns.isEmpty() ? maker.Modifiers(paramFlags) : maker.Modifiers(paramFlags, typeUseAnns);
JCVariableDecl param = maker.VarDef(paramMods, data.getSingularName(), paramType, null);
- List<JCTypeParameter> typeParams = List.nil();
- List<JCExpression> thrown = List.nil();
- finishAndInjectMethod(maker, returnType, builderType, source, typeParams, thrown, mods, body, name, List.of(param));
+ finishAndInjectMethod(maker, returnType, builderType, source, mods, body, name, List.of(param));
}
@Override
@@ -137,8 +135,6 @@ abstract class JavacJavaUtilListSetSingularizer extends JavacJavaUtilSingularize
JCExpression paramType = chainDots(builderType, "java", "util", "Collection");
paramType = addTypeArgs(1, true, builderType, paramType, data.getTypeArgs(), source);
JCVariableDecl param = maker.VarDef(maker.Modifiers(paramFlags), data.getPluralName(), paramType, null);
- List<JCTypeParameter> typeParams = List.nil();
- List<JCExpression> thrown = List.nil();
- finishAndInjectMethod(maker, returnType, builderType, source, typeParams, thrown, mods, body, name, List.of(param));
+ finishAndInjectMethod(maker, returnType, builderType, source, mods, body, name, List.of(param));
}
}
diff --git a/src/core/lombok/javac/handlers/singulars/JavacJavaUtilMapSingularizer.java b/src/core/lombok/javac/handlers/singulars/JavacJavaUtilMapSingularizer.java
index fe0db83e..c7483be6 100644
--- a/src/core/lombok/javac/handlers/singulars/JavacJavaUtilMapSingularizer.java
+++ b/src/core/lombok/javac/handlers/singulars/JavacJavaUtilMapSingularizer.java
@@ -159,9 +159,7 @@ public class JavacJavaUtilMapSingularizer extends JavacJavaUtilSingularizer {
JCModifiers paramModsValue = typeUseAnnsValue.isEmpty() ? maker.Modifiers(paramFlags) : maker.Modifiers(paramFlags, typeUseAnnsValue);
JCVariableDecl paramKey = maker.VarDef(paramModsKey, keyName, paramTypeKey, null);
JCVariableDecl paramValue = maker.VarDef(paramModsValue, valueName, paramTypeValue, null);
- List<JCTypeParameter> typeParams = List.nil();
- List<JCExpression> thrown = List.nil();
- finishAndInjectMethod(maker, returnType, builderType, source, typeParams, thrown, mods, body, name, List.of(paramKey, paramValue));
+ finishAndInjectMethod(maker, returnType, builderType, source, mods, body, name, List.of(paramKey, paramValue));
}
@Override
@@ -192,8 +190,7 @@ public class JavacJavaUtilMapSingularizer extends JavacJavaUtilSingularizer {
JCExpression paramType = chainDots(builderType, "java", "util", "Map");
paramType = addTypeArgs(2, true, builderType, paramType, data.getTypeArgs(), source);
JCVariableDecl param = maker.VarDef(maker.Modifiers(paramFlags), data.getPluralName(), paramType, null);
- List<JCTypeParameter> typeParams = List.nil();
- finishAndInjectMethod(maker, returnType, builderType, source, typeParams, jceBlank, mods, body, name, List.of(param));
+ finishAndInjectMethod(maker, returnType, builderType, source, mods, body, name, List.of(param));
}
@Override public void appendBuildCode(SingularData data, JavacNode builderType, JCTree source, ListBuffer<JCStatement> statements, Name targetVariableName, String builderVariable) {