diff options
author | Emil Lundberg <emil@emlun.se> | 2019-01-13 01:32:55 +0100 |
---|---|---|
committer | Emil Lundberg <emil@emlun.se> | 2019-01-13 02:38:14 +0100 |
commit | 258a9bf2886e841f2921208d44bd380d900ccc37 (patch) | |
tree | f15cc36d89ad1f76183e04c26e0cfb32cb2ec7e7 /src | |
parent | f6d2933795d9091d0cace8d81df530967d84a779 (diff) | |
download | lombok-258a9bf2886e841f2921208d44bd380d900ccc37.tar.gz lombok-258a9bf2886e841f2921208d44bd380d900ccc37.tar.bz2 lombok-258a9bf2886e841f2921208d44bd380d900ccc37.zip |
Push Guava singularizer instances down from JavacJavaUtilSingularizer
Diffstat (limited to 'src')
3 files changed, 3 insertions, 2 deletions
diff --git a/src/core/lombok/javac/handlers/singulars/JavacJavaUtilListSetSingularizer.java b/src/core/lombok/javac/handlers/singulars/JavacJavaUtilListSetSingularizer.java index c5cd0738..26054203 100644 --- a/src/core/lombok/javac/handlers/singulars/JavacJavaUtilListSetSingularizer.java +++ b/src/core/lombok/javac/handlers/singulars/JavacJavaUtilListSetSingularizer.java @@ -44,6 +44,7 @@ import com.sun.tools.javac.util.ListBuffer; import com.sun.tools.javac.util.Name; abstract class JavacJavaUtilListSetSingularizer extends JavacJavaUtilSingularizer { + private final JavacSingularizer guavaListSetSingularizer = new JavacGuavaSetListSingularizer(); @Override protected JavacSingularizer getGuavaInstead(JavacNode node) { return guavaListSetSingularizer; diff --git a/src/core/lombok/javac/handlers/singulars/JavacJavaUtilMapSingularizer.java b/src/core/lombok/javac/handlers/singulars/JavacJavaUtilMapSingularizer.java index 69215c11..1d4d8eee 100644 --- a/src/core/lombok/javac/handlers/singulars/JavacJavaUtilMapSingularizer.java +++ b/src/core/lombok/javac/handlers/singulars/JavacJavaUtilMapSingularizer.java @@ -49,6 +49,8 @@ import com.sun.tools.javac.util.Name; @ProviderFor(JavacSingularizer.class) public class JavacJavaUtilMapSingularizer extends JavacJavaUtilSingularizer { + private final JavacSingularizer guavaMapSingularizer = new JavacGuavaMapSingularizer(); + @Override public LombokImmutableList<String> getSupportedTypes() { return LombokImmutableList.of("java.util.Map", "java.util.SortedMap", "java.util.NavigableMap"); } diff --git a/src/core/lombok/javac/handlers/singulars/JavacJavaUtilSingularizer.java b/src/core/lombok/javac/handlers/singulars/JavacJavaUtilSingularizer.java index 47098467..8c22a41e 100644 --- a/src/core/lombok/javac/handlers/singulars/JavacJavaUtilSingularizer.java +++ b/src/core/lombok/javac/handlers/singulars/JavacJavaUtilSingularizer.java @@ -39,8 +39,6 @@ import lombok.javac.handlers.JavacSingularsRecipes.JavacSingularizer; import lombok.javac.handlers.JavacSingularsRecipes.SingularData; abstract class JavacJavaUtilSingularizer extends JavacSingularizer { - protected final JavacSingularizer guavaListSetSingularizer = new JavacGuavaSetListSingularizer(); - protected final JavacSingularizer guavaMapSingularizer = new JavacGuavaMapSingularizer(); protected List<JCStatement> createJavaUtilSetMapInitialCapacitySwitchStatements(JavacTreeMaker maker, SingularData data, JavacNode builderType, boolean mapMode, String emptyCollectionMethod, String singletonCollectionMethod, String targetType, JCTree source, String builderVariable) { List<JCExpression> jceBlank = List.nil(); |