From ca7fdd7becb9340441d870e952ab1545973ae12a Mon Sep 17 00:00:00 2001 From: Emil Lundberg Date: Thu, 10 Jan 2019 04:43:09 +0100 Subject: Pull method getAddMethodName up to JavacSingularizer --- src/core/lombok/javac/handlers/JavacSingularsRecipes.java | 2 ++ src/core/lombok/javac/handlers/singulars/JavacGuavaSingularizer.java | 2 +- .../javac/handlers/singulars/JavacJavaUtilListSetSingularizer.java | 3 ++- .../lombok/javac/handlers/singulars/JavacJavaUtilMapSingularizer.java | 3 ++- 4 files changed, 7 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/core/lombok/javac/handlers/JavacSingularsRecipes.java b/src/core/lombok/javac/handlers/JavacSingularsRecipes.java index 1546e523..fbfd0b7c 100644 --- a/src/core/lombok/javac/handlers/JavacSingularsRecipes.java +++ b/src/core/lombok/javac/handlers/JavacSingularsRecipes.java @@ -404,5 +404,7 @@ public class JavacSingularsRecipes { } } } + + protected abstract String getAddMethodName(); } } diff --git a/src/core/lombok/javac/handlers/singulars/JavacGuavaSingularizer.java b/src/core/lombok/javac/handlers/singulars/JavacGuavaSingularizer.java index 64345742..e2571507 100644 --- a/src/core/lombok/javac/handlers/singulars/JavacGuavaSingularizer.java +++ b/src/core/lombok/javac/handlers/singulars/JavacGuavaSingularizer.java @@ -193,7 +193,7 @@ abstract class JavacGuavaSingularizer extends JavacSingularizer { } protected abstract LombokImmutableList getArgumentSuffixes(); - protected abstract String getAddMethodName(); + protected abstract String getAddAllTypeName(); protected int getTypeArgumentsCount() { diff --git a/src/core/lombok/javac/handlers/singulars/JavacJavaUtilListSetSingularizer.java b/src/core/lombok/javac/handlers/singulars/JavacJavaUtilListSetSingularizer.java index e3a568f8..f2bd94ea 100644 --- a/src/core/lombok/javac/handlers/singulars/JavacJavaUtilListSetSingularizer.java +++ b/src/core/lombok/javac/handlers/singulars/JavacJavaUtilListSetSingularizer.java @@ -134,7 +134,8 @@ abstract class JavacJavaUtilListSetSingularizer extends JavacJavaUtilSingularize finishAndInjectMethod(maker, returnType, builderType, source, mods, body, name, List.of(param)); } - private String getAddMethodName() { + @Override + protected String getAddMethodName() { return "add"; } } diff --git a/src/core/lombok/javac/handlers/singulars/JavacJavaUtilMapSingularizer.java b/src/core/lombok/javac/handlers/singulars/JavacJavaUtilMapSingularizer.java index ddbb546c..09077660 100644 --- a/src/core/lombok/javac/handlers/singulars/JavacJavaUtilMapSingularizer.java +++ b/src/core/lombok/javac/handlers/singulars/JavacJavaUtilMapSingularizer.java @@ -197,7 +197,8 @@ public class JavacJavaUtilMapSingularizer extends JavacJavaUtilSingularizer { } } - private String getAddMethodName() { + @Override + protected String getAddMethodName() { return "put"; } } -- cgit