From 889c935ec9f0e45bba1e88b0f256e1f29a734f39 Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Thu, 19 Dec 2019 21:26:35 +0100 Subject: [fixes #2268] make lombok generate qualified types in order to avoid name clashes. --- doc/changelog.markdown | 1 + .../eclipse/handlers/EclipseHandlerUtil.java | 151 ++++++++++++++++++++- .../lombok/eclipse/handlers/HandleBuilder.java | 43 ++++-- .../lombok/eclipse/handlers/HandleConstructor.java | 2 +- .../eclipse/handlers/HandleSuperBuilder.java | 61 +++++---- src/core/lombok/javac/handlers/HandleBuilder.java | 59 ++++---- .../lombok/javac/handlers/HandleSuperBuilder.java | 49 +++---- .../lombok/javac/handlers/JavacHandlerUtil.java | 37 ++--- .../resource/after-delombok/BuilderComplex.java | 12 +- .../resource/after-delombok/BuilderCustomName.java | 12 +- .../resource/after-delombok/BuilderDefaults.java | 10 +- .../after-delombok/BuilderDefaultsGenerics.java | 10 +- .../after-delombok/BuilderDefaultsWarnings.java | 18 +-- .../after-delombok/BuilderGenericMethod.java | 8 +- .../after-delombok/BuilderInstanceMethod.java | 12 +- .../resource/after-delombok/BuilderJavadoc.java | 8 +- .../resource/after-delombok/BuilderSimple.java | 8 +- .../BuilderSimpleWithSetterPrefix.java | 6 +- .../BuilderSingularAnnotatedTypes.java | 16 +-- ...lderSingularAnnotatedTypesWithSetterPrefix.java | 16 +-- .../BuilderSingularGuavaListsSets.java | 34 ++--- ...lderSingularGuavaListsSetsWithSetterPrefix.java | 140 ------------------- .../after-delombok/BuilderSingularGuavaMaps.java | 22 +-- .../BuilderSingularGuavaMapsWithSetterPrefix.java | 94 ------------- .../after-delombok/BuilderSingularLists.java | 22 +-- .../BuilderSingularListsWithSetterPrefix.java | 123 ----------------- .../after-delombok/BuilderSingularMaps.java | 28 ++-- .../BuilderSingularMapsWithSetterPrefix.java | 28 ++-- .../after-delombok/BuilderSingularNoAuto.java | 22 +-- .../BuilderSingularNoAutoWithSetterPrefix.java | 22 +-- .../BuilderSingularRedirectToGuava.java | 22 +-- ...derSingularRedirectToGuavaWithSetterPrefix.java | 93 ------------- .../after-delombok/BuilderSingularSets.java | 28 ++-- .../BuilderSingularSetsWithSetterPrefix.java | 28 ++-- .../BuilderSingularToBuilderWithNull.java | 14 +- ...rSingularToBuilderWithNullWithSetterPrefix.java | 14 +- .../BuilderSingularWildcardListsWithToBuilder.java | 20 +-- ...WildcardListsWithToBuilderWithSetterPrefix.java | 97 ------------- .../BuilderSingularWithPrefixes.java | 10 +- ...uilderSingularWithPrefixesWithSetterPrefix.java | 10 +- .../resource/after-delombok/BuilderTypeAnnos.java | 6 +- .../BuilderTypeAnnosWithSetterPrefix.java | 6 +- .../resource/after-delombok/BuilderValueData.java | 8 +- .../BuilderValueDataWithSetterPrefix.java | 8 +- .../after-delombok/BuilderWithAccessors.java | 12 +- .../BuilderWithAccessorsWithSetterPrefix.java | 60 -------- .../after-delombok/BuilderWithBadNames.java | 8 +- .../BuilderWithBadNamesWithSetterPrefix.java | 42 ------ .../after-delombok/BuilderWithDeprecated.java | 20 +-- .../BuilderWithDeprecatedWithSetterPrefix.java | 114 ---------------- .../BuilderWithExistingBuilderClass.java | 8 +- ...erWithExistingBuilderClassWithSetterPrefix.java | 8 +- .../after-delombok/BuilderWithNoBuilderMethod.java | 6 +- ...BuilderWithNoBuilderMethodWithSetterPrefix.java | 33 ----- .../after-delombok/BuilderWithNonNull.java | 6 +- .../BuilderWithNonNullWithSetterPrefix.java | 6 +- .../BuilderWithRecursiveGenerics.java | 12 +- ...ilderWithRecursiveGenericsWithSetterPrefix.java | 85 ------------ .../after-delombok/BuilderWithToBuilder.java | 34 ++--- .../BuilderWithToBuilderWithSetterPrefix.java | 146 -------------------- .../after-delombok/BuilderWithTolerate.java | 6 +- .../BuilderWithTolerateWithSetterPrefix.java | 40 ------ .../after-delombok/CheckerFrameworkBuilder.java | 18 +-- .../CheckerFrameworkSuperBuilder.java | 50 +++---- .../ConstructorsWithBuilderDefaults.java | 8 +- .../ConstructorsWithBuilderDefaults2.java | 10 +- .../after-delombok/JacksonJsonProperty.java | 6 +- .../after-delombok/SuperBuilderAbstract.java | 36 ++--- .../SuperBuilderAbstractToBuilder.java | 56 ++++---- .../resource/after-delombok/SuperBuilderBasic.java | 32 ++--- .../after-delombok/SuperBuilderBasicToBuilder.java | 50 +++---- .../after-delombok/SuperBuilderCustomized.java | 20 +-- .../SuperBuilderSingularAnnotatedTypes.java | 12 +- .../SuperBuilderWithCustomBuilderMethod.java | 28 ++-- .../after-delombok/SuperBuilderWithDefaults.java | 38 +++--- .../after-delombok/SuperBuilderWithGenerics.java | 32 ++--- .../after-delombok/SuperBuilderWithGenerics2.java | 32 ++--- .../after-delombok/SuperBuilderWithGenerics3.java | 32 ++--- .../SuperBuilderWithGenericsAndToBuilder.java | 48 +++---- .../after-delombok/SuperBuilderWithNonNull.java | 34 ++--- .../after-delombok/SuperBuilderWithPrefixes.java | 12 +- .../resource/after-ecj/BuilderComplex.java | 12 +- .../resource/after-ecj/BuilderCustomName.java | 12 +- .../resource/after-ecj/BuilderDefaults.java | 10 +- .../after-ecj/BuilderDefaultsGenerics.java | 10 +- .../after-ecj/BuilderDefaultsWarnings.java | 18 +-- .../resource/after-ecj/BuilderGenericMethod.java | 8 +- .../resource/after-ecj/BuilderInstanceMethod.java | 12 +- .../resource/after-ecj/BuilderJavadoc.java | 8 +- .../resource/after-ecj/BuilderSimple.java | 8 +- .../after-ecj/BuilderSimpleWithSetterPrefix.java | 6 +- .../after-ecj/BuilderSingularAnnotatedTypes.java | 16 +-- ...lderSingularAnnotatedTypesWithSetterPrefix.java | 16 +-- .../after-ecj/BuilderSingularGuavaListsSets.java | 34 ++--- ...lderSingularGuavaListsSetsWithSetterPrefix.java | 125 ----------------- .../after-ecj/BuilderSingularGuavaMaps.java | 22 +-- .../BuilderSingularGuavaMapsWithSetterPrefix.java | 83 ----------- .../resource/after-ecj/BuilderSingularLists.java | 22 +-- .../BuilderSingularListsWithSetterPrefix.java | 116 ---------------- .../resource/after-ecj/BuilderSingularMaps.java | 28 ++-- .../BuilderSingularMapsWithSetterPrefix.java | 28 ++-- .../resource/after-ecj/BuilderSingularNoAuto.java | 22 +-- .../BuilderSingularNoAutoWithSetterPrefix.java | 22 +-- .../after-ecj/BuilderSingularRedirectToGuava.java | 22 +-- ...derSingularRedirectToGuavaWithSetterPrefix.java | 83 ----------- .../resource/after-ecj/BuilderSingularSets.java | 28 ++-- .../BuilderSingularSetsWithSetterPrefix.java | 28 ++-- .../BuilderSingularToBuilderWithNull.java | 14 +- ...rSingularToBuilderWithNullWithSetterPrefix.java | 14 +- .../BuilderSingularWildcardListsWithToBuilder.java | 20 +-- ...WildcardListsWithToBuilderWithSetterPrefix.java | 92 ------------- .../after-ecj/BuilderSingularWithPrefixes.java | 10 +- ...uilderSingularWithPrefixesWithSetterPrefix.java | 10 +- .../resource/after-ecj/BuilderTypeAnnos.java | 6 +- .../BuilderTypeAnnosWithSetterPrefix.java | 6 +- .../resource/after-ecj/BuilderValueData.java | 8 +- .../BuilderValueDataWithSetterPrefix.java | 8 +- .../resource/after-ecj/BuilderWithAccessors.java | 12 +- .../BuilderWithAccessorsWithSetterPrefix.java | 47 ------- .../resource/after-ecj/BuilderWithBadNames.java | 8 +- .../BuilderWithBadNamesWithSetterPrefix.java | 33 ----- .../resource/after-ecj/BuilderWithDeprecated.java | 20 +-- .../BuilderWithDeprecatedWithSetterPrefix.java | 87 ------------ .../after-ecj/BuilderWithExistingBuilderClass.java | 8 +- ...erWithExistingBuilderClassWithSetterPrefix.java | 8 +- .../after-ecj/BuilderWithNoBuilderMethod.java | 6 +- ...BuilderWithNoBuilderMethodWithSetterPrefix.java | 27 ---- .../resource/after-ecj/BuilderWithNonNull.java | 6 +- .../BuilderWithNonNullWithSetterPrefix.java | 6 +- .../after-ecj/BuilderWithRecursiveGenerics.java | 12 +- ...ilderWithRecursiveGenericsWithSetterPrefix.java | 78 ----------- .../resource/after-ecj/BuilderWithToBuilder.java | 34 ++--- .../BuilderWithToBuilderWithSetterPrefix.java | 124 ----------------- .../resource/after-ecj/BuilderWithTolerate.java | 6 +- .../BuilderWithTolerateWithSetterPrefix.java | 34 ----- .../after-ecj/CheckerFrameworkBuilder.java | 18 +-- .../after-ecj/CheckerFrameworkSuperBuilder.java | 50 +++---- .../after-ecj/ConstructorsWithBuilderDefaults.java | 8 +- .../ConstructorsWithBuilderDefaults2.java | 10 +- .../resource/after-ecj/JacksonJsonProperty.java | 6 +- .../resource/after-ecj/SuperBuilderAbstract.java | 36 ++--- .../after-ecj/SuperBuilderAbstractToBuilder.java | 56 ++++---- .../resource/after-ecj/SuperBuilderBasic.java | 32 ++--- .../after-ecj/SuperBuilderBasicToBuilder.java | 50 +++---- .../resource/after-ecj/SuperBuilderCustomized.java | 20 +-- .../SuperBuilderSingularAnnotatedTypes.java | 12 +- .../SuperBuilderWithCustomBuilderMethod.java | 28 ++-- .../after-ecj/SuperBuilderWithDefaults.java | 38 +++--- .../after-ecj/SuperBuilderWithGenerics.java | 32 ++--- .../after-ecj/SuperBuilderWithGenerics2.java | 32 ++--- .../after-ecj/SuperBuilderWithGenerics3.java | 32 ++--- .../SuperBuilderWithGenericsAndToBuilder.java | 48 +++---- .../after-ecj/SuperBuilderWithNonNull.java | 34 ++--- .../after-ecj/SuperBuilderWithPrefixes.java | 12 +- ...lderSingularGuavaListsSetsWithSetterPrefix.java | 16 --- .../BuilderSingularGuavaMapsWithSetterPrefix.java | 12 -- .../BuilderSingularListsWithSetterPrefix.java | 11 -- ...derSingularRedirectToGuavaWithSetterPrefix.java | 13 -- ...WildcardListsWithToBuilderWithSetterPrefix.java | 10 -- .../BuilderWithAccessorsWithSetterPrefix.java | 7 - .../BuilderWithBadNamesWithSetterPrefix.java | 5 - .../BuilderWithDeprecatedWithSetterPrefix.java | 11 -- ...BuilderWithNoBuilderMethodWithSetterPrefix.java | 5 - ...ilderWithRecursiveGenericsWithSetterPrefix.java | 13 -- .../BuilderWithToBuilderWithSetterPrefix.java | 20 --- .../BuilderWithTolerateWithSetterPrefix.java | 18 --- 166 files changed, 1451 insertions(+), 3425 deletions(-) delete mode 100644 test/transform/resource/after-delombok/BuilderSingularGuavaListsSetsWithSetterPrefix.java delete mode 100644 test/transform/resource/after-delombok/BuilderSingularGuavaMapsWithSetterPrefix.java delete mode 100644 test/transform/resource/after-delombok/BuilderSingularListsWithSetterPrefix.java delete mode 100644 test/transform/resource/after-delombok/BuilderSingularRedirectToGuavaWithSetterPrefix.java delete mode 100644 test/transform/resource/after-delombok/BuilderSingularWildcardListsWithToBuilderWithSetterPrefix.java delete mode 100644 test/transform/resource/after-delombok/BuilderWithAccessorsWithSetterPrefix.java delete mode 100644 test/transform/resource/after-delombok/BuilderWithBadNamesWithSetterPrefix.java delete mode 100644 test/transform/resource/after-delombok/BuilderWithDeprecatedWithSetterPrefix.java delete mode 100644 test/transform/resource/after-delombok/BuilderWithNoBuilderMethodWithSetterPrefix.java delete mode 100644 test/transform/resource/after-delombok/BuilderWithRecursiveGenericsWithSetterPrefix.java delete mode 100644 test/transform/resource/after-delombok/BuilderWithToBuilderWithSetterPrefix.java delete mode 100644 test/transform/resource/after-delombok/BuilderWithTolerateWithSetterPrefix.java delete mode 100644 test/transform/resource/after-ecj/BuilderSingularGuavaListsSetsWithSetterPrefix.java delete mode 100644 test/transform/resource/after-ecj/BuilderSingularGuavaMapsWithSetterPrefix.java delete mode 100644 test/transform/resource/after-ecj/BuilderSingularListsWithSetterPrefix.java delete mode 100644 test/transform/resource/after-ecj/BuilderSingularRedirectToGuavaWithSetterPrefix.java delete mode 100644 test/transform/resource/after-ecj/BuilderSingularWildcardListsWithToBuilderWithSetterPrefix.java delete mode 100644 test/transform/resource/after-ecj/BuilderWithAccessorsWithSetterPrefix.java delete mode 100644 test/transform/resource/after-ecj/BuilderWithBadNamesWithSetterPrefix.java delete mode 100644 test/transform/resource/after-ecj/BuilderWithDeprecatedWithSetterPrefix.java delete mode 100644 test/transform/resource/after-ecj/BuilderWithNoBuilderMethodWithSetterPrefix.java delete mode 100644 test/transform/resource/after-ecj/BuilderWithRecursiveGenericsWithSetterPrefix.java delete mode 100644 test/transform/resource/after-ecj/BuilderWithToBuilderWithSetterPrefix.java delete mode 100644 test/transform/resource/after-ecj/BuilderWithTolerateWithSetterPrefix.java delete mode 100644 test/transform/resource/before/BuilderSingularGuavaListsSetsWithSetterPrefix.java delete mode 100644 test/transform/resource/before/BuilderSingularGuavaMapsWithSetterPrefix.java delete mode 100644 test/transform/resource/before/BuilderSingularListsWithSetterPrefix.java delete mode 100644 test/transform/resource/before/BuilderSingularRedirectToGuavaWithSetterPrefix.java delete mode 100644 test/transform/resource/before/BuilderSingularWildcardListsWithToBuilderWithSetterPrefix.java delete mode 100644 test/transform/resource/before/BuilderWithAccessorsWithSetterPrefix.java delete mode 100644 test/transform/resource/before/BuilderWithBadNamesWithSetterPrefix.java delete mode 100644 test/transform/resource/before/BuilderWithDeprecatedWithSetterPrefix.java delete mode 100644 test/transform/resource/before/BuilderWithNoBuilderMethodWithSetterPrefix.java delete mode 100644 test/transform/resource/before/BuilderWithRecursiveGenericsWithSetterPrefix.java delete mode 100644 test/transform/resource/before/BuilderWithToBuilderWithSetterPrefix.java delete mode 100644 test/transform/resource/before/BuilderWithTolerateWithSetterPrefix.java diff --git a/doc/changelog.markdown b/doc/changelog.markdown index 115ae609..13cceff8 100644 --- a/doc/changelog.markdown +++ b/doc/changelog.markdown @@ -5,6 +5,7 @@ Lombok Changelog * PLATFORM: Support for JDK13 (including `yield` in switch expressions, as well as delombok having a nicer style for arrow-style switch blocks, and text blocks). * FEATURE: You can now configure a builder's 'setter' prefixes via `@Builder(setterPrefix = "set")` for example. We discourage doing this, but if some library you use requires them, have at it. [Pull Request #2174](https://github.com/rzwitserloot/lombok/pull/2174], [Issue #1805](https://github.com/rzwitserloot/lombok/issues/1805). * BUGFIX: Referring to an inner class inside the generics on a class marked with `@SuperBuilder` would cause the error `wrong number of type arguments; required 3` [Issue #2262](https://github.com/rzwitserloot/lombok/issues/2262); fixed by github user [`@Lekanich`](https://github.com/rzwitserloot/lombok/issues/2262) - thank you! +* IMPROBABLE BREAKING CHANGE: Lombok now generates qualified types (so, `Outer.Inner` instead of just `Inner`) in most type signatures that it generates; this should avoid exotic scenarios where the types lombok puts in signatures end up referring to unintended other types, which can occur if your class implements an interface that itself defines a type with the same name as one defined in your source file. I told you it was exotic. Thanks to Hunter Anderson for doing some preliminary work on this change. [Issue #2268](https://github.com/rzwitserloot/lombok/issues/2268) ### v1.18.10 (September 10th, 2019) diff --git a/src/core/lombok/eclipse/handlers/EclipseHandlerUtil.java b/src/core/lombok/eclipse/handlers/EclipseHandlerUtil.java index 0955dba6..1c988d31 100644 --- a/src/core/lombok/eclipse/handlers/EclipseHandlerUtil.java +++ b/src/core/lombok/eclipse/handlers/EclipseHandlerUtil.java @@ -505,7 +505,13 @@ public class EclipseHandlerUtil { } catch (Exception ignore) {} } - public static TypeReference namePlusTypeParamsToTypeReference(char[] typeName, TypeParameter[] params, long p) { + public static TypeReference namePlusTypeParamsToTypeReference(EclipseNode type, TypeParameter[] params, long p) { + TypeDeclaration td = (TypeDeclaration) type.get(); + boolean instance = (td.modifiers & ClassFileConstants.AccStatic) == 0; + return namePlusTypeParamsToTypeReference(type.up(), td.name, instance, params, p); + } + + public static TypeReference namePlusTypeParamsToTypeReference(EclipseNode parentType, char[] typeName, boolean instance, TypeParameter[] params, long p) { if (params != null && params.length > 0) { TypeReference[] refs = new TypeReference[params.length]; int idx = 0; @@ -513,10 +519,10 @@ public class EclipseHandlerUtil { TypeReference typeRef = new SingleTypeReference(param.name, p); refs[idx++] = typeRef; } - return new ParameterizedSingleTypeReference(typeName, refs, 0, p); + return generateParameterizedTypeReference(parentType, typeName, instance, refs, p); } - return new SingleTypeReference(typeName, p); + return generateTypeReference(parentType, typeName, instance, p); } public static TypeReference[] copyTypes(TypeReference[] refs) { @@ -851,15 +857,150 @@ public class EclipseHandlerUtil { if (source != null) setGeneratedBy(typeRef, source); refs[idx++] = typeRef; } - result = new ParameterizedSingleTypeReference(typeDecl.name, refs, 0, p); + result = generateParameterizedTypeReference(type, refs, p); } else { - result = new SingleTypeReference(((TypeDeclaration)type.get()).name, p); + result = generateTypeReference(type, p); } } if (result != null && source != null) setGeneratedBy(result, source); return result; } + public static TypeReference generateParameterizedTypeReference(EclipseNode type, TypeReference[] typeParams, long p) { + TypeDeclaration td = (TypeDeclaration) type.get(); + char[][] tn = getQualifiedInnerName(type.up(), td.name); + if (tn.length == 1) return new ParameterizedSingleTypeReference(tn[0], typeParams, 0, p); + int tnLen = tn.length; + long[] ps = new long[tnLen]; + for (int i = 0; i < tnLen; i++) ps[i] = p; + TypeReference[][] rr = new TypeReference[tnLen][]; + rr[tnLen - 1] = typeParams; + boolean instance = (td.modifiers & ClassFileConstants.AccStatic) == 0; + if (instance) fillOuterTypeParams(rr, tnLen - 2, type.up(), p); + return new ParameterizedQualifiedTypeReference(tn, rr, 0, ps); + } + + public static TypeReference generateParameterizedTypeReference(EclipseNode parent, char[] name, boolean instance, TypeReference[] typeParams, long p) { + char[][] tn = getQualifiedInnerName(parent, name); + if (tn.length == 1) return new ParameterizedSingleTypeReference(tn[0], typeParams, 0, p); + int tnLen = tn.length; + long[] ps = new long[tnLen]; + for (int i = 0; i < tnLen; i++) ps[i] = p; + TypeReference[][] rr = new TypeReference[tnLen][]; + rr[tnLen - 1] = typeParams; + if (instance) fillOuterTypeParams(rr, tnLen - 2, parent, p); + return new ParameterizedQualifiedTypeReference(tn, rr, 0, ps); + } + + /** + * This class will add type params to fully qualified chain of type references for inner types, such as {@code GrandParent.Parent.Child}; this is needed only as long as the chain does not involve static. + * + * @return {@code true} if at least one parameterization is actually added, {@code false} otherwise. + */ + private static boolean fillOuterTypeParams(TypeReference[][] rr, int idx, EclipseNode node, long p) { + if (idx < 0 || node == null || !(node.get() instanceof TypeDeclaration)) return false; + boolean filled = false; + TypeDeclaration td = (TypeDeclaration) node.get(); + TypeParameter[] tps = td.typeParameters; + if (tps != null && tps.length > 0) { + TypeReference[] trs = new TypeReference[tps.length]; + for (int i = 0; i < tps.length; i++) { + trs[i] = new SingleTypeReference(tps[i].name, p); + } + rr[idx] = trs; + filled = true; + } + if ((td.modifiers & ClassFileConstants.AccStatic) != 0) return filled; // Once we hit a static class, no further typeparams needed. + boolean f2 = fillOuterTypeParams(rr, idx - 1, node.up(), p); + return f2 || filled; + } + + public static NameReference generateNameReference(EclipseNode type, long p) { + char[][] tn = getQualifiedInnerName(type.up(), ((TypeDeclaration) type.get()).name); + if (tn.length == 1) return new SingleNameReference(tn[0], p); + int tnLen = tn.length; + long[] ps = new long[tnLen]; + for (int i = 0; i < tnLen; i++) ps[i] = p; + int ss = (int) (p >> 32); + int se = (int) p; + return new QualifiedNameReference(tn, ps, ss, se); + } + + public static NameReference generateNameReference(EclipseNode parent, char[] name, long p) { + char[][] tn = getQualifiedInnerName(parent, name); + if (tn.length == 1) return new SingleNameReference(tn[0], p); + int tnLen = tn.length; + long[] ps = new long[tnLen]; + for (int i = 0; i < tnLen; i++) ps[i] = p; + int ss = (int) (p >> 32); + int se = (int) p; + return new QualifiedNameReference(tn, ps, ss, se); + } + + public static TypeReference generateTypeReference(EclipseNode type, long p) { + TypeDeclaration td = (TypeDeclaration) type.get(); + char[][] tn = getQualifiedInnerName(type.up(), td.name); + if (tn.length == 1) return new SingleTypeReference(tn[0], p); + int tnLen = tn.length; + long[] ps = new long[tnLen]; + for (int i = 0; i < tnLen; i++) ps[i] = p; + + boolean instance = (td.modifiers & ClassFileConstants.AccStatic) == 0 && type.up() != null && type.up().get() instanceof TypeDeclaration; + if (instance) { + TypeReference[][] trs = new TypeReference[tn.length][]; + boolean filled = fillOuterTypeParams(trs, trs.length - 2, type.up(), p); + if (filled) return new ParameterizedQualifiedTypeReference(tn, trs, 0, ps); + } + + return new QualifiedTypeReference(tn, ps); + } + + public static TypeReference generateTypeReference(EclipseNode parent, char[] name, boolean instance, long p) { + char[][] tn = getQualifiedInnerName(parent, name); + if (tn.length == 1) return new SingleTypeReference(tn[0], p); + int tnLen = tn.length; + long[] ps = new long[tnLen]; + for (int i = 0; i < tnLen; i++) ps[i] = p; + + if (instance && parent != null && parent.get() instanceof TypeDeclaration) { + TypeReference[][] trs = new TypeReference[tn.length][]; + if (fillOuterTypeParams(trs, tn.length - 2, parent, p)) return new ParameterizedQualifiedTypeReference(tn, trs, 0, ps); + } + + return new QualifiedTypeReference(tn, ps); + } + + /** + * Generate a chain of names for the enclosing classes. + * + * Given for example {@code class Outer { class Inner {} }} this would generate {@code char[][] { "Outer", "Inner" }}. + * For method local and top level types, this generates a size-1 char[][] where the only char[] element is {@code name} itself. + */ + private static char[][] getQualifiedInnerName(EclipseNode parent, char[] name) { + int count = 0; + + EclipseNode n = parent; + while (n != null && n.getKind() == Kind.TYPE && n.get() instanceof TypeDeclaration) { + TypeDeclaration td = (TypeDeclaration) n.get(); + if (td.name == null || td.name.length == 0) break; + count++; + n = n.up(); + } + + if (count == 0) return new char[][] { name }; + char[][] res = new char[count + 1][]; + res[count] = name; + + n = parent; + while (n != null && n.getKind() == Kind.TYPE && n.get() instanceof TypeDeclaration) { + TypeDeclaration td = (TypeDeclaration) n.get(); + res[--count] = td.name; + n = n.up(); + } + + return res; + } + public static TypeReference makeType(TypeBinding binding, ASTNode pos, boolean allowCompound) { if (binding.getClass() == EclipseReflectiveMembers.INTERSECTION_BINDING) { Object[] arr = (Object[]) EclipseReflectiveMembers.reflect(EclipseReflectiveMembers.INTERSECTION_BINDING_TYPES, binding); diff --git a/src/core/lombok/eclipse/handlers/HandleBuilder.java b/src/core/lombok/eclipse/handlers/HandleBuilder.java index 70978e23..6cc5bd57 100755 --- a/src/core/lombok/eclipse/handlers/HandleBuilder.java +++ b/src/core/lombok/eclipse/handlers/HandleBuilder.java @@ -55,6 +55,7 @@ import org.eclipse.jdt.internal.compiler.ast.NullLiteral; import org.eclipse.jdt.internal.compiler.ast.OperatorIds; import org.eclipse.jdt.internal.compiler.ast.ParameterizedQualifiedTypeReference; import org.eclipse.jdt.internal.compiler.ast.ParameterizedSingleTypeReference; +import org.eclipse.jdt.internal.compiler.ast.QualifiedAllocationExpression; import org.eclipse.jdt.internal.compiler.ast.QualifiedThisReference; import org.eclipse.jdt.internal.compiler.ast.QualifiedTypeReference; import org.eclipse.jdt.internal.compiler.ast.ReturnStatement; @@ -274,7 +275,7 @@ public class HandleBuilder extends EclipseAnnotationHandler { handleConstructor.generateConstructor(tdParent, AccessLevel.PACKAGE, allFields, false, null, SkipIfConstructorExists.I_AM_BUILDER, Collections.emptyList(), annotationNode); - returnType = namePlusTypeParamsToTypeReference(td.name, td.typeParameters, p); + returnType = namePlusTypeParamsToTypeReference(tdParent, td.typeParameters, p); typeParams = td.typeParameters; thrownExceptions = null; nameOfStaticBuilderMethod = null; @@ -289,7 +290,7 @@ public class HandleBuilder extends EclipseAnnotationHandler { tdParent = parent.up(); TypeDeclaration td = (TypeDeclaration) tdParent.get(); - returnType = namePlusTypeParamsToTypeReference(td.name, td.typeParameters, p); + returnType = namePlusTypeParamsToTypeReference(tdParent, td.typeParameters, p); typeParams = td.typeParameters; thrownExceptions = cd.thrownExceptions; nameOfStaticBuilderMethod = null; @@ -539,7 +540,7 @@ public class HandleBuilder extends EclipseAnnotationHandler { tps[i].name = typeArgsForToBuilder.get(i); } } - MethodDeclaration md = generateToBuilderMethod(cfv, toBuilderMethodName, builderClassName, tdParent, tps, builderFields, fluent, ast, accessForOuters, builderInstance.setterPrefix()); + MethodDeclaration md = generateToBuilderMethod(cfv, isStatic, toBuilderMethodName, builderClassName, tdParent, tps, builderFields, fluent, ast, accessForOuters, builderInstance.setterPrefix()); if (md != null) injectMethod(tdParent, md); } @@ -552,7 +553,7 @@ public class HandleBuilder extends EclipseAnnotationHandler { } private static final char[] BUILDER_TEMP_VAR = {'b', 'u', 'i', 'l', 'd', 'e', 'r'}; - private MethodDeclaration generateToBuilderMethod(CheckerFrameworkVersion cfv, String methodName, String builderClassName, EclipseNode type, TypeParameter[] typeParams, List builderFields, boolean fluent, ASTNode source, AccessLevel access, String prefix) { + private MethodDeclaration generateToBuilderMethod(CheckerFrameworkVersion cfv, boolean isStatic, String methodName, String builderClassName, EclipseNode type, TypeParameter[] typeParams, List builderFields, boolean fluent, ASTNode source, AccessLevel access, String prefix) { int pS = source.sourceStart, pE = source.sourceEnd; long p = (long) pS << 32 | pE; @@ -560,9 +561,9 @@ public class HandleBuilder extends EclipseAnnotationHandler { out.selector = methodName.toCharArray(); out.modifiers = toEclipseModifier(access); out.bits |= ECLIPSE_DO_NOT_TOUCH_FLAG; - out.returnType = namePlusTypeParamsToTypeReference(builderClassName.toCharArray(), typeParams, p); + out.returnType = namePlusTypeParamsToTypeReference(type, builderClassName.toCharArray(), !isStatic, typeParams, p); AllocationExpression invoke = new AllocationExpression(); - invoke.type = namePlusTypeParamsToTypeReference(builderClassName.toCharArray(), typeParams, p); + invoke.type = namePlusTypeParamsToTypeReference(type, builderClassName.toCharArray(), !isStatic, typeParams, p); Expression receiver = invoke; List statements = null; @@ -593,7 +594,7 @@ public class HandleBuilder extends EclipseAnnotationHandler { obtainExpr.typeArguments[j] = new SingleTypeReference(typeParams[j].name, 0); } } - obtainExpr.receiver = new SingleNameReference(type.getName().toCharArray(), 0); + obtainExpr.receiver = generateNameReference(type, 0); } else { obtainExpr.receiver = new ThisReference(0, 0); } @@ -623,7 +624,7 @@ public class HandleBuilder extends EclipseAnnotationHandler { LocalDeclaration b = new LocalDeclaration(BUILDER_TEMP_VAR, pS, pE); out.statements[0] = b; b.modifiers |= Modifier.FINAL; - b.type = namePlusTypeParamsToTypeReference(builderClassName.toCharArray(), typeParams, p); + b.type = namePlusTypeParamsToTypeReference(type, builderClassName.toCharArray(), !isStatic, typeParams, p); b.type.sourceStart = pS; b.type.sourceEnd = pE; b.initialization = receiver; out.statements[out.statements.length - 1] = new ReturnStatement(new SingleNameReference(BUILDER_TEMP_VAR, p), pS, pE); @@ -684,7 +685,7 @@ public class HandleBuilder extends EclipseAnnotationHandler { } ann.memberValue = arr; } - Argument arg = new Argument(new char[] { 't', 'h', 'i', 's' }, 0, new SingleTypeReference(type.getName().toCharArray(), source.sourceStart), Modifier.FINAL); + Argument arg = new Argument(new char[] { 't', 'h', 'i', 's' }, 0, generateTypeReference(type, source.sourceStart), Modifier.FINAL); arg.annotations = new Annotation[] {ann}; return new Argument[] {arg}; } @@ -751,7 +752,7 @@ public class HandleBuilder extends EclipseAnnotationHandler { if (isStatic) { invoke.receiver = new SingleNameReference(type.up().getName().toCharArray(), 0); } else { - invoke.receiver = new QualifiedThisReference(new SingleTypeReference(type.up().getName().toCharArray(), 0) , 0, 0); + invoke.receiver = new QualifiedThisReference(generateTypeReference(type.up(), 0) , 0, 0); } invoke.typeArguments = typeParameterNames(((TypeDeclaration) type.get()).typeParameters); @@ -801,17 +802,31 @@ public class HandleBuilder extends EclipseAnnotationHandler { public MethodDeclaration generateBuilderMethod(CheckerFrameworkVersion cfv, boolean isStatic, String builderMethodName, String builderClassName, EclipseNode type, TypeParameter[] typeParams, ASTNode source, AccessLevel access) { int pS = source.sourceStart, pE = source.sourceEnd; long p = (long) pS << 32 | pE; + char[] builderClassName_ = builderClassName.toCharArray(); MethodDeclaration out = new MethodDeclaration(((CompilationUnitDeclaration) type.top().get()).compilationResult); out.selector = builderMethodName.toCharArray(); out.modifiers = toEclipseModifier(access); if (isStatic) out.modifiers |= ClassFileConstants.AccStatic; out.bits |= ECLIPSE_DO_NOT_TOUCH_FLAG; - out.returnType = namePlusTypeParamsToTypeReference(builderClassName.toCharArray(), typeParams, p); + out.returnType = namePlusTypeParamsToTypeReference(type, builderClassName_, !isStatic, typeParams, p); out.typeParameters = copyTypeParams(typeParams, source); AllocationExpression invoke = new AllocationExpression(); - invoke.type = namePlusTypeParamsToTypeReference(builderClassName.toCharArray(), typeParams, p); - out.statements = new Statement[] {new ReturnStatement(invoke, pS, pE)}; + if (isStatic) { + invoke.type = namePlusTypeParamsToTypeReference(type, builderClassName_, false, typeParams, p); + out.statements = new Statement[] {new ReturnStatement(invoke, pS, pE)}; + } else { + // return this.new Builder(); + QualifiedAllocationExpression qualifiedInvoke = new QualifiedAllocationExpression(); + qualifiedInvoke.enclosingInstance = new ThisReference(pS, pE); + if (typeParams == null || typeParams.length == 0) { + qualifiedInvoke.type = new SingleTypeReference(builderClassName_, p); + } else { + qualifiedInvoke.type = namePlusTypeParamsToTypeReference(null, builderClassName_, false, typeParams, p); + } + + out.statements = new Statement[] {new ReturnStatement(qualifiedInvoke, pS, pE)}; + } Annotation uniqueAnn = cfv.generateUnique() ? generateNamedAnnotation(source, CheckerFrameworkVersion.NAME__UNIQUE) : null; Annotation sefAnn = cfv.generateSideEffectFree() ? generateNamedAnnotation(source, CheckerFrameworkVersion.NAME__SIDE_EFFECT_FREE) : null; if (uniqueAnn != null && sefAnn != null) { @@ -904,7 +919,7 @@ public class HandleBuilder extends EclipseAnnotationHandler { Argument[] arr = setter.arguments == null ? new Argument[0] : setter.arguments; Argument[] newArr = new Argument[arr.length + 1]; System.arraycopy(arr, 0, newArr, 1, arr.length); - newArr[0] = new Argument(new char[] { 't', 'h', 'i', 's' }, 0, new SingleTypeReference(builderType.getName().toCharArray(), 0), Modifier.FINAL); + newArr[0] = new Argument(new char[] { 't', 'h', 'i', 's' }, 0, generateTypeReference(builderType, 0), Modifier.FINAL); char[][] nameNotCalled = fromQualifiedName(CheckerFrameworkVersion.NAME__NOT_CALLED); SingleMemberAnnotation ann = new SingleMemberAnnotation(new QualifiedTypeReference(nameNotCalled, poss( source, nameNotCalled.length)), source.sourceStart); diff --git a/src/core/lombok/eclipse/handlers/HandleConstructor.java b/src/core/lombok/eclipse/handlers/HandleConstructor.java index 8f981c1a..7cb2036b 100755 --- a/src/core/lombok/eclipse/handlers/HandleConstructor.java +++ b/src/core/lombok/eclipse/handlers/HandleConstructor.java @@ -530,7 +530,7 @@ public class HandleConstructor { constructor.modifiers = toEclipseModifier(level) | ClassFileConstants.AccStatic; TypeDeclaration typeDecl = (TypeDeclaration) type.get(); - constructor.returnType = EclipseHandlerUtil.namePlusTypeParamsToTypeReference(typeDecl.name, typeDecl.typeParameters, p); + constructor.returnType = EclipseHandlerUtil.namePlusTypeParamsToTypeReference(type, typeDecl.typeParameters, p); constructor.annotations = null; constructor.selector = name.toCharArray(); constructor.thrownExceptions = null; diff --git a/src/core/lombok/eclipse/handlers/HandleSuperBuilder.java b/src/core/lombok/eclipse/handlers/HandleSuperBuilder.java index 8f0ef338..fbd4ce24 100755 --- a/src/core/lombok/eclipse/handlers/HandleSuperBuilder.java +++ b/src/core/lombok/eclipse/handlers/HandleSuperBuilder.java @@ -217,7 +217,7 @@ public class HandleSuperBuilder extends EclipseAnnotationHandler { String builderImplClassName = builderClassName + "Impl"; typeParams = td.typeParameters != null ? td.typeParameters : new TypeParameter[0]; - returnType = namePlusTypeParamsToTypeReference(td.name, typeParams, p); + returnType = namePlusTypeParamsToTypeReference(tdParent, typeParams, p); // are the generics for our builder. String classGenericName = "C"; @@ -438,7 +438,7 @@ public class HandleSuperBuilder extends EclipseAnnotationHandler { o = new TypeParameter(); o.name = builderGenericName.toCharArray(); TypeReference[] typerefs = appendBuilderTypeReferences(typeParams, classGenericName, builderGenericName); - o.type = new ParameterizedSingleTypeReference(builderClass.toCharArray(), typerefs, 0, 0); + o.type = generateParameterizedTypeReference(tdParent, builderClass.toCharArray(), false, typerefs, 0); builder.typeParameters[builder.typeParameters.length - 1] = o; builder.superclass = copyType(superclassBuilderClass, source); @@ -469,8 +469,8 @@ public class HandleSuperBuilder extends EclipseAnnotationHandler { // 2. The return type for the build() method (named "C" in the abstract builder), which is the annotated class. // 3. The return type for all setter methods (named "B" in the abstract builder), which is this builder class. typeArgs[typeArgs.length - 2] = cloneSelfType(tdParent, source); - typeArgs[typeArgs.length - 1] = createTypeReferenceWithTypeParameters(builderImplClass, typeParams); - builder.superclass = new ParameterizedSingleTypeReference(builderAbstractClass.toCharArray(), typeArgs, 0, 0); + typeArgs[typeArgs.length - 1] = createTypeReferenceWithTypeParameters(tdParent, builderImplClass, typeParams); + builder.superclass = generateParameterizedTypeReference(tdParent, builderAbstractClass.toCharArray(), false, typeArgs, 0); } builder.createDefaultConstructor(false, true); @@ -523,7 +523,7 @@ public class HandleSuperBuilder extends EclipseAnnotationHandler { constructor.bodyEnd = constructor.declarationSourceEnd = constructor.sourceEnd = source.sourceEnd; TypeReference[] wildcards = new TypeReference[] {new Wildcard(Wildcard.UNBOUND), new Wildcard(Wildcard.UNBOUND)}; - TypeReference builderType = new ParameterizedSingleTypeReference(builderClassName.toCharArray(), mergeToTypeReferences(typeParams, wildcards), 0, p); + TypeReference builderType = generateParameterizedTypeReference(typeNode, builderClassName.toCharArray(), false, mergeToTypeReferences(typeParams, wildcards), p); constructor.arguments = new Argument[] {new Argument(BUILDER_VARIABLE_NAME, p, builderType, Modifier.FINAL)}; List statements = new ArrayList(); @@ -554,7 +554,7 @@ public class HandleSuperBuilder extends EclipseAnnotationHandler { MessageSend defaultMethodCall = new MessageSend(); defaultMethodCall.sourceStart = source.sourceStart; defaultMethodCall.sourceEnd = source.sourceEnd; - defaultMethodCall.receiver = new SingleNameReference(((TypeDeclaration) typeNode.get()).name, 0L); + defaultMethodCall.receiver = generateNameReference(typeNode, 0L); defaultMethodCall.selector = fieldNode.nameOfDefaultProvider; defaultMethodCall.typeArguments = typeParameterNames(((TypeDeclaration) typeNode.get()).typeParameters); @@ -591,10 +591,10 @@ public class HandleSuperBuilder extends EclipseAnnotationHandler { if (typeParams != null && typeParams.length > 0) out.typeParameters = copyTypeParams(typeParams, source); TypeReference[] wildcards = new TypeReference[] {new Wildcard(Wildcard.UNBOUND), new Wildcard(Wildcard.UNBOUND) }; - out.returnType = new ParameterizedSingleTypeReference(builderClassName.toCharArray(), mergeToTypeReferences(typeParams, wildcards), 0, p); + out.returnType = generateParameterizedTypeReference(type, builderClassName.toCharArray(), false, mergeToTypeReferences(typeParams, wildcards), p); AllocationExpression invoke = new AllocationExpression(); - invoke.type = namePlusTypeParamsToTypeReference(builderImplClassName.toCharArray(), typeParams, p); + invoke.type = namePlusTypeParamsToTypeReference(type, builderImplClassName.toCharArray(), false, typeParams, p); out.statements = new Statement[] {new ReturnStatement(invoke, pS, pE)}; if (cfv.generateUnique()) out.annotations = new Annotation[] {generateNamedAnnotation(source, CheckerFrameworkVersion.NAME__UNIQUE)}; @@ -606,8 +606,8 @@ public class HandleSuperBuilder extends EclipseAnnotationHandler { /** * Generates a toBuilder() method in the annotated class that looks like this: *
-	 * public ParentBuilder<?, ?> toBuilder() {
-	 *     return new FoobarBuilderImpl().$fillValuesFrom(this);
+	 * public Foobar.FoobarBuilder<?, ?> toBuilder() {
+	 *     return new .FoobarBuilderImpl().$fillValuesFrom(this);
 	 * }
 	 * 
*/ @@ -621,10 +621,10 @@ public class HandleSuperBuilder extends EclipseAnnotationHandler { out.bits |= ECLIPSE_DO_NOT_TOUCH_FLAG; TypeReference[] wildcards = new TypeReference[] {new Wildcard(Wildcard.UNBOUND), new Wildcard(Wildcard.UNBOUND) }; - out.returnType = new ParameterizedSingleTypeReference(builderClassName.toCharArray(), mergeToTypeReferences(typeParams, wildcards), 0, p); + out.returnType = generateParameterizedTypeReference(type, builderClassName.toCharArray(), false, mergeToTypeReferences(typeParams, wildcards), p); AllocationExpression newClass = new AllocationExpression(); - newClass.type = namePlusTypeParamsToTypeReference(builderImplClassName.toCharArray(), typeParams, p); + newClass.type = namePlusTypeParamsToTypeReference(type, builderImplClassName.toCharArray(), false, typeParams, p); MessageSend invokeFillMethod = new MessageSend(); invokeFillMethod.receiver = newClass; invokeFillMethod.selector = FILL_VALUES_METHOD_NAME; @@ -643,7 +643,7 @@ public class HandleSuperBuilder extends EclipseAnnotationHandler { *
 	 * protected B $fillValuesFrom(final C instance) {
 	 *     super.$fillValuesFrom(instance);
-	 *     FoobarBuilderImpl.$fillValuesFromInstanceIntoBuilder(instance, this);
+	 *     Foobar.FoobarBuilderImpl.$fillValuesFromInstanceIntoBuilder(instance, this);
 	 *     return self();
 	 * }
 	 * 
@@ -672,7 +672,7 @@ public class HandleSuperBuilder extends EclipseAnnotationHandler { // Call the builder implemention's helper method that actually fills the values from the instance. MessageSend callStaticFillValuesMethod = new MessageSend(); - callStaticFillValuesMethod.receiver = new SingleNameReference(builderClassName.toCharArray(), 0); + callStaticFillValuesMethod.receiver = generateNameReference(tdParent, builderClassName.toCharArray(), 0); callStaticFillValuesMethod.selector = FILL_VALUES_STATIC_METHOD_NAME; callStaticFillValuesMethod.arguments = new Expression[] {new SingleNameReference(INSTANCE_VARIABLE_NAME, 0), new ThisReference(0, 0)}; body.add(callStaticFillValuesMethod); @@ -707,16 +707,25 @@ public class HandleSuperBuilder extends EclipseAnnotationHandler { out.returnType = TypeReference.baseTypeReference(TypeIds.T_void, 0); TypeReference[] wildcards = new TypeReference[] {new Wildcard(Wildcard.UNBOUND), new Wildcard(Wildcard.UNBOUND)}; - TypeReference builderType = new ParameterizedSingleTypeReference(builderClassName.toCharArray(), mergeToTypeReferences(typeParams, wildcards), 0, 0); + TypeReference builderType = generateParameterizedTypeReference(tdParent, builderClassName.toCharArray(), false, mergeToTypeReferences(typeParams, wildcards), 0); Argument builderArgument = new Argument(BUILDER_VARIABLE_NAME, 0, builderType, Modifier.FINAL); - TypeReference parentArgument = createTypeReferenceWithTypeParameters(tdParent.getName(), typeParams); + TypeReference[] typerefs = null; + if (typeParams.length > 0) { + typerefs = new TypeReference[typeParams.length]; + for (int i = 0; i < typeParams.length; i++) typerefs[i] = new SingleTypeReference(typeParams[i].name, 0); + } + + long p = source.sourceStart; + p = (p << 32) | source.sourceEnd; + + TypeReference parentArgument = typerefs == null ? generateTypeReference(tdParent, p) : generateParameterizedTypeReference(tdParent, typerefs, p); out.arguments = new Argument[] {new Argument(INSTANCE_VARIABLE_NAME, 0, parentArgument, Modifier.FINAL), builderArgument}; - + // Add type params if there are any. if (typeParams.length > 0) out.typeParameters = copyTypeParams(typeParams, source); - + List body = new ArrayList(); - + // Call the builder's setter methods to fill the values from the instance. for (BuilderFieldData bfd : builderFields) { MessageSend exec = createSetterCallWithInstanceValue(bfd, tdParent, source); @@ -727,7 +736,7 @@ public class HandleSuperBuilder extends EclipseAnnotationHandler { return out; } - + private MessageSend createSetterCallWithInstanceValue(BuilderFieldData bfd, EclipseNode type, ASTNode source) { char[] setterName = bfd.name; MessageSend ms = new MessageSend(); @@ -745,7 +754,7 @@ public class HandleSuperBuilder extends EclipseAnnotationHandler { boolean obtainIsStatic = bfd.obtainVia.isStatic(); for (int i = 0; i < tgt.length; i++) { MessageSend obtainExpr = new MessageSend(); - obtainExpr.receiver = obtainIsStatic ? new SingleNameReference(type.getName().toCharArray(), 0) : new SingleNameReference(INSTANCE_VARIABLE_NAME, 0); + obtainExpr.receiver = obtainIsStatic ? generateNameReference(type, 0) : new SingleNameReference(INSTANCE_VARIABLE_NAME, 0); obtainExpr.selector = obtainName.toCharArray(); if (obtainIsStatic) obtainExpr.arguments = new Expression[] {new SingleNameReference(INSTANCE_VARIABLE_NAME, 0)}; tgt[i] = obtainExpr; @@ -796,7 +805,7 @@ public class HandleSuperBuilder extends EclipseAnnotationHandler { else if (rrAnn != null) out.annotations = new Annotation[] {overrideAnn, rrAnn}; else if (sefAnn != null) out.annotations = new Annotation[] {overrideAnn, sefAnn}; else out.annotations = new Annotation[] {overrideAnn}; - out.returnType = namePlusTypeParamsToTypeReference(builderImplType.getName().toCharArray(), typeParams, p); + out.returnType = namePlusTypeParamsToTypeReference(builderImplType, typeParams, p); out.statements = new Statement[] {new ReturnStatement(new ThisReference(0, 0), 0, 0)}; return out; } @@ -959,7 +968,7 @@ public class HandleSuperBuilder extends EclipseAnnotationHandler { Argument[] arr = setter.arguments == null ? new Argument[0] : setter.arguments; Argument[] newArr = new Argument[arr.length + 1]; System.arraycopy(arr, 0, newArr, 1, arr.length); - newArr[0] = new Argument(new char[] { 't', 'h', 'i', 's' }, 0, new SingleTypeReference(builderType.getName().toCharArray(), 0), Modifier.FINAL); + newArr[0] = new Argument(new char[] { 't', 'h', 'i', 's' }, 0, generateTypeReference(builderType, 0), Modifier.FINAL); char[][] nameNotCalled = fromQualifiedName(CheckerFrameworkVersion.NAME__NOT_CALLED); SingleMemberAnnotation ann = new SingleMemberAnnotation(new QualifiedTypeReference(nameNotCalled, poss(source, nameNotCalled.length)), source.sourceStart); ann.memberValue = new StringLiteral(setterName.toCharArray(), 0, 0, 0); @@ -1067,15 +1076,15 @@ public class HandleSuperBuilder extends EclipseAnnotationHandler { return typeArgs; } - private static SingleTypeReference createTypeReferenceWithTypeParameters(String referenceName, TypeParameter[] typeParams) { + private static TypeReference createTypeReferenceWithTypeParameters(EclipseNode parent, String referenceName, TypeParameter[] typeParams) { if (typeParams.length > 0) { TypeReference[] typerefs = new TypeReference[typeParams.length]; for (int i = 0; i < typeParams.length; i++) { typerefs[i] = new SingleTypeReference(typeParams[i].name, 0); } - return new ParameterizedSingleTypeReference(referenceName.toCharArray(), typerefs, 0, 0); + return generateParameterizedTypeReference(parent, referenceName.toCharArray(), false, typerefs, 0); } else { - return new SingleTypeReference(referenceName.toCharArray(), 0); + return generateTypeReference(parent, referenceName.toCharArray(), false, 0); } } diff --git a/src/core/lombok/javac/handlers/HandleBuilder.java b/src/core/lombok/javac/handlers/HandleBuilder.java index 349b1382..00741249 100644 --- a/src/core/lombok/javac/handlers/HandleBuilder.java +++ b/src/core/lombok/javac/handlers/HandleBuilder.java @@ -21,6 +21,12 @@ */ package lombok.javac.handlers; +import static lombok.core.handlers.HandlerUtil.*; +import static lombok.javac.Javac.*; +import static lombok.javac.JavacTreeMaker.TypeTag.typeTag; +import static lombok.javac.handlers.JavacHandlerUtil.*; +import static lombok.javac.handlers.JavacHandlerUtil.isFieldDeprecated; + import java.util.ArrayList; import javax.lang.model.element.Modifier; @@ -40,6 +46,7 @@ import com.sun.tools.javac.tree.JCTree.JCIf; import com.sun.tools.javac.tree.JCTree.JCLiteral; import com.sun.tools.javac.tree.JCTree.JCMethodDecl; import com.sun.tools.javac.tree.JCTree.JCModifiers; +import com.sun.tools.javac.tree.JCTree.JCNewClass; import com.sun.tools.javac.tree.JCTree.JCPrimitiveTypeTree; import com.sun.tools.javac.tree.JCTree.JCStatement; import com.sun.tools.javac.tree.JCTree.JCTypeApply; @@ -60,6 +67,7 @@ import lombok.core.AnnotationValues; import lombok.core.HandlerPriority; import lombok.core.configuration.CheckerFrameworkVersion; import lombok.core.handlers.HandlerUtil; +import lombok.core.handlers.HandlerUtil.FieldAccess; import lombok.core.handlers.InclusionExclusionUtils.Included; import lombok.experimental.NonFinal; import lombok.javac.Javac; @@ -67,12 +75,10 @@ import lombok.javac.JavacAnnotationHandler; import lombok.javac.JavacNode; import lombok.javac.JavacTreeMaker; import lombok.javac.handlers.HandleConstructor.SkipIfConstructorExists; +import lombok.javac.handlers.JavacHandlerUtil.CopyJavadoc; +import lombok.javac.handlers.JavacHandlerUtil.MemberExistsResult; import lombok.javac.handlers.JavacSingularsRecipes.JavacSingularizer; import lombok.javac.handlers.JavacSingularsRecipes.SingularData; -import static lombok.core.handlers.HandlerUtil.*; -import static lombok.javac.handlers.JavacHandlerUtil.*; -import static lombok.javac.Javac.*; -import static lombok.javac.JavacTreeMaker.TypeTag.*; @ProviderFor(JavacAnnotationHandler.class) @HandlerPriority(-1024) //-2^10; to ensure we've picked up @FieldDefault's changes (-2048) but @Value hasn't removed itself yet (-512), so that we can error on presence of it on the builder classes. @@ -216,7 +222,7 @@ public class HandleBuilder extends JavacAnnotationHandler { handleConstructor.generateConstructor(tdParent, AccessLevel.PACKAGE, List.nil(), allFields.toList(), false, null, SkipIfConstructorExists.I_AM_BUILDER, annotationNode); - returnType = namePlusTypeParamsToTypeReference(tdParent.getTreeMaker(), td.name, td.typarams); + returnType = namePlusTypeParamsToTypeReference(tdParent.getTreeMaker(), tdParent, td.typarams); typeParams = td.typarams; thrownExceptions = List.nil(); nameOfBuilderMethod = null; @@ -231,7 +237,7 @@ public class HandleBuilder extends JavacAnnotationHandler { tdParent = parent.up(); JCClassDecl td = (JCClassDecl) tdParent.get(); - returnType = namePlusTypeParamsToTypeReference(tdParent.getTreeMaker(), td.name, td.typarams); + returnType = namePlusTypeParamsToTypeReference(tdParent.getTreeMaker(), tdParent, td.typarams); typeParams = td.typarams; thrownExceptions = jmd.thrown; nameOfBuilderMethod = null; @@ -487,7 +493,7 @@ public class HandleBuilder extends JavacAnnotationHandler { } tps = lb.toList(); } - JCMethodDecl md = generateToBuilderMethod(cfv, toBuilderMethodName, builderClassName, tdParent, tps, builderFields, fluent, ast, accessForOuters, builderInstance.setterPrefix()); + JCMethodDecl md = generateToBuilderMethod(cfv, toBuilderMethodName, builderClassName, tdParent, isStatic, tps, builderFields, fluent, ast, accessForOuters, builderInstance.setterPrefix()); if (md != null) { recursiveSetGeneratedBy(md, ast, annotationNode.getContext()); injectMethod(tdParent, md); @@ -536,7 +542,7 @@ public class HandleBuilder extends JavacAnnotationHandler { } private static final String BUILDER_TEMP_VAR = "builder"; - private JCMethodDecl generateToBuilderMethod(CheckerFrameworkVersion cfv, String toBuilderMethodName, String builderClassName, JavacNode type, List typeParams, java.util.List builderFields, boolean fluent, JCAnnotation ast, AccessLevel access, String prefix) { + private JCMethodDecl generateToBuilderMethod(CheckerFrameworkVersion cfv, String toBuilderMethodName, String builderClassName, JavacNode type, boolean isStatic, List typeParams, java.util.List builderFields, boolean fluent, JCAnnotation ast, AccessLevel access, String prefix) { // return new ThingieBuilder().setA(this.a).setB(this.b); JavacTreeMaker maker = type.getTreeMaker(); @@ -545,7 +551,7 @@ public class HandleBuilder extends JavacAnnotationHandler { typeArgs.append(maker.Ident(typeParam.name)); } - JCExpression call = maker.NewClass(null, List.nil(), namePlusTypeParamsToTypeReference(maker, type.toName(builderClassName), typeParams), List.nil(), null); + JCExpression call = maker.NewClass(null, List.nil(), namePlusTypeParamsToTypeReference(maker, type, type.toName(builderClassName), !isStatic, typeParams), List.nil(), null); JCExpression invoke = call; ListBuffer statements = new ListBuffer(); for (BuilderFieldData bfd : builderFields) { @@ -584,7 +590,7 @@ public class HandleBuilder extends JavacAnnotationHandler { } } if (!statements.isEmpty()) { - JCExpression tempVarType = namePlusTypeParamsToTypeReference(maker, type.toName(builderClassName), typeParams); + JCExpression tempVarType = namePlusTypeParamsToTypeReference(maker, type, type.toName(builderClassName), !isStatic, typeParams); statements.prepend(maker.VarDef(maker.Modifiers(Flags.FINAL), type.toName(BUILDER_TEMP_VAR), tempVarType, invoke)); statements.append(maker.Return(maker.Ident(type.toName(BUILDER_TEMP_VAR)))); } else { @@ -592,7 +598,7 @@ public class HandleBuilder extends JavacAnnotationHandler { } JCBlock body = maker.Block(0, statements.toList()); List annsOnMethod = cfv.generateUnique() ? List.of(maker.Annotation(genTypeRef(type, CheckerFrameworkVersion.NAME__UNIQUE), List.nil())) : List.nil(); - return maker.MethodDef(maker.Modifiers(toJavacModifier(access), annsOnMethod), type.toName(toBuilderMethodName), namePlusTypeParamsToTypeReference(maker, type.toName(builderClassName), typeParams), List.nil(), List.nil(), List.nil(), body, null); + return maker.MethodDef(maker.Modifiers(toJavacModifier(access), annsOnMethod), type.toName(toBuilderMethodName), namePlusTypeParamsToTypeReference(maker, type, type.toName(builderClassName), !isStatic, typeParams), List.nil(), List.nil(), List.nil(), body, null); } private JCMethodDecl generateCleanMethod(java.util.List builderFields, JavacNode type, JCTree source) { @@ -610,18 +616,6 @@ public class HandleBuilder extends JavacAnnotationHandler { JCMethodDecl method = maker.MethodDef(maker.Modifiers(toJavacModifier(AccessLevel.PRIVATE)), type.toName("$lombokClean"), maker.Type(Javac.createVoidType(type.getSymbolTable(), CTC_VOID)), List.nil(), List.nil(), List.nil(), body, null); recursiveSetGeneratedBy(method, source, type.getContext()); return method; - /* - * if (shouldReturnThis) { - methodType = cloneSelfType(field); - } - - if (methodType == null) { - //WARNING: Do not use field.getSymbolTable().voidType - that field has gone through non-backwards compatible API changes within javac1.6. - methodType = treeMaker.Type(Javac.createVoidType(treeMaker, CTC_VOID)); - shouldReturnThis = false; - } - - */ } static List generateBuildArgs(CheckerFrameworkVersion cfv, JavacNode type, java.util.List builderFields) { @@ -643,10 +637,10 @@ public class HandleBuilder extends JavacAnnotationHandler { } JCAnnotation recvAnno = maker.Annotation(genTypeRef(type, CheckerFrameworkVersion.NAME__CALLED), List.of(arg)); JCClassDecl builderTypeNode = (JCClassDecl) type.get(); - JCVariableDecl recv = maker.VarDef(maker.Modifiers(0L, List.of(recvAnno)), type.toName("this"), maker.Ident(builderTypeNode.name), null); + JCVariableDecl recv = maker.VarDef(maker.Modifiers(0L, List.of(recvAnno)), type.toName("this"), namePlusTypeParamsToTypeReference(maker, type, builderTypeNode.typarams), null); return List.of(recv); } - + private JCMethodDecl generateBuildMethod(CheckerFrameworkVersion cfv, JavacNode tdParent, boolean isStatic, String buildName, Name builderName, JCExpression returnType, java.util.List builderFields, JavacNode type, List thrownExceptions, JCTree source, boolean addCleaning, AccessLevel access) { JavacTreeMaker maker = type.getTreeMaker(); @@ -725,7 +719,14 @@ public class HandleBuilder extends JavacAnnotationHandler { typeArgs.append(maker.Ident(typeParam.name)); } - JCExpression call = maker.NewClass(null, List.nil(), namePlusTypeParamsToTypeReference(maker, type.toName(builderClassName), typeParams), List.nil(), null); + JCExpression call; + if (isStatic) { + call = maker.NewClass(null, List.nil(), namePlusTypeParamsToTypeReference(maker, type, type.toName(builderClassName), false, typeParams), List.nil(), null); + } else { + call = maker.NewClass(null, List.nil(), namePlusTypeParamsToTypeReference(maker, null, type.toName(builderClassName), false, typeParams), List.nil(), null); + ((JCNewClass) call).encl = maker.Ident(type.toName("this")); + + } JCStatement statement = maker.Return(call); JCBlock body = maker.Block(0, List.of(statement)); @@ -738,7 +739,7 @@ public class HandleBuilder extends JavacAnnotationHandler { else if (annUnique != null) annsOnMethod = List.of(annUnique); else if (annSef != null) annsOnMethod = List.of(annSef); else annsOnMethod = List.nil(); - return maker.MethodDef(maker.Modifiers(modifiers, annsOnMethod), type.toName(builderMethodName), namePlusTypeParamsToTypeReference(maker, type.toName(builderClassName), typeParams), copyTypeParams(source, typeParams), List.nil(), List.nil(), body, null); + return maker.MethodDef(maker.Modifiers(modifiers, annsOnMethod), type.toName(builderMethodName), namePlusTypeParamsToTypeReference(maker, type, type.toName(builderClassName), !isStatic, typeParams), copyTypeParams(source, typeParams), List.nil(), List.nil(), body, null); } public void generateBuilderFields(JavacNode builderType, java.util.List builderFields, JCTree source) { @@ -785,7 +786,6 @@ public class HandleBuilder extends JavacAnnotationHandler { if (fieldNode.singularData == null || fieldNode.singularData.getSingularizer() == null) { makePrefixedSetterMethodForBuilder(cfv, builderType, deprecate, fieldNode.createdFields.get(0), fieldNode.name, fieldNode.nameOfSetFlag, source, fluent, chain, fieldNode.annotations, fieldNode.originalFieldNode, access, prefix); } else { - // TODO prefixed version fieldNode.singularData.getSingularizer().generateMethods(cfv, fieldNode.singularData, deprecate, builderType, source.get(), fluent, chain, access); } } @@ -809,7 +809,8 @@ public class HandleBuilder extends JavacAnnotationHandler { if (cfv.generateCalledMethods()) { JCAnnotation ncAnno = maker.Annotation(genTypeRef(source, CheckerFrameworkVersion.NAME__NOT_CALLED), List.of(maker.Literal(newMethod.getName().toString()))); JCClassDecl builderTypeNode = (JCClassDecl) builderType.get(); - JCVariableDecl recv = maker.VarDef(maker.Modifiers(0L, List.of(ncAnno)), builderType.toName("this"), maker.Ident(builderTypeNode.name), null); + JCExpression selfType = namePlusTypeParamsToTypeReference(maker, builderType, builderTypeNode.typarams); + JCVariableDecl recv = maker.VarDef(maker.Modifiers(0L, List.of(ncAnno)), builderType.toName("this"), selfType, null); newMethod.params = List.of(recv, newMethod.params.get(0)); } recursiveSetGeneratedBy(newMethod, source.get(), builderType.getContext()); diff --git a/src/core/lombok/javac/handlers/HandleSuperBuilder.java b/src/core/lombok/javac/handlers/HandleSuperBuilder.java index 83dc23d1..d37b3049 100644 --- a/src/core/lombok/javac/handlers/HandleSuperBuilder.java +++ b/src/core/lombok/javac/handlers/HandleSuperBuilder.java @@ -408,18 +408,15 @@ public class HandleSuperBuilder extends JavacAnnotationHandler { allTypeParams.addAll(copyTypeParams(source, typeParams)); // Add builder-specific type params required for inheritable builders. // 1. The return type for the build() method, named "C", which extends the annotated class. - JCExpression annotatedClass = maker.Ident(tdParent.toName(tdParent.getName())); - if (typeParams.nonEmpty()) { - // Add type params of the annotated class. - annotatedClass = maker.TypeApply(annotatedClass, getTypeParamExpressions(typeParams, maker).toList()); - } + JCExpression annotatedClass = namePlusTypeParamsToTypeReference(maker, tdParent, typeParams); + allTypeParams.add(maker.TypeParameter(tdParent.toName(classGenericName), List.of(annotatedClass))); // 2. The return type for all setter methods, named "B", which extends this builder class. Name builderClassName = tdParent.toName(builderClass); ListBuffer typeParamsForBuilder = getTypeParamExpressions(typeParams, maker); typeParamsForBuilder.add(maker.Ident(tdParent.toName(classGenericName))); typeParamsForBuilder.add(maker.Ident(tdParent.toName(builderGenericName))); - JCTypeApply typeApply = maker.TypeApply(maker.Ident(builderClassName), typeParamsForBuilder.toList()); + JCTypeApply typeApply = maker.TypeApply(namePlusTypeParamsToTypeReference(maker, tdParent, builderClassName, false, List.nil()), typeParamsForBuilder.toList()); allTypeParams.add(maker.TypeParameter(tdParent.toName(builderGenericName), List.of(typeApply))); JCExpression extending = null; @@ -445,22 +442,16 @@ public class HandleSuperBuilder extends JavacAnnotationHandler { JCModifiers mods = maker.Modifiers(Flags.STATIC | Flags.PRIVATE | Flags.FINAL); // Extend the abstract builder. - JCExpression extending = maker.Ident(tdParent.toName(builderAbstractClass)); + JCExpression extending = namePlusTypeParamsToTypeReference(maker, tdParent, tdParent.toName(builderAbstractClass), false, List.nil()); // Add any type params of the annotated class. ListBuffer allTypeParams = new ListBuffer(); allTypeParams.addAll(copyTypeParams(source, typeParams)); // Add builder-specific type params required for inheritable builders. // 1. The return type for the build() method (named "C" in the abstract builder), which is the annotated class. - JCExpression annotatedClass = maker.Ident(tdParent.toName(tdParent.getName())); - if (typeParams.nonEmpty()) { - // Add type params of the annotated class. - annotatedClass = maker.TypeApply(annotatedClass, getTypeParamExpressions(typeParams, maker).toList()); - } + JCExpression annotatedClass = namePlusTypeParamsToTypeReference(maker, tdParent, typeParams); // 2. The return type for all setter methods (named "B" in the abstract builder), which is this builder class. - JCExpression builderImplClassExpression = maker.Ident(tdParent.toName(builderImplClass)); - if (typeParams.nonEmpty()) { - builderImplClassExpression = maker.TypeApply(builderImplClassExpression, getTypeParamExpressions(typeParams, maker).toList()); - } + JCExpression builderImplClassExpression = namePlusTypeParamsToTypeReference(maker, tdParent, tdParent.toName(builderImplClass), false, typeParams); + ListBuffer typeParamsForBuilder = getTypeParamExpressions(typeParams, maker); typeParamsForBuilder.add(annotatedClass); typeParamsForBuilder.add(builderImplClassExpression); @@ -509,7 +500,8 @@ public class HandleSuperBuilder extends JavacAnnotationHandler { if (bfd.nameOfSetFlag != null) { JCFieldAccess setField = maker.Select(maker.Ident(builderVariableName), bfd.nameOfSetFlag); fieldInThis = maker.Select(maker.Ident(typeNode.toName("this")), bfd.rawName); - JCAssign assignDefault = maker.Assign(fieldInThis, maker.Apply(typeParameterNames(maker, ((JCClassDecl) typeNode.get()).typarams), maker.Select(maker.Ident(((JCClassDecl) typeNode.get()).name), bfd.nameOfDefaultProvider), List.nil())); + JCExpression parentTypeRef = namePlusTypeParamsToTypeReference(maker, typeNode, List.nil()); + JCAssign assignDefault = maker.Assign(fieldInThis, maker.Apply(typeParameterNames(maker, ((JCClassDecl) typeNode.get()).typarams), maker.Select(parentTypeRef, bfd.nameOfDefaultProvider), List.nil())); statements.append(maker.If(setField, assign, maker.Exec(assignDefault))); } else { statements.append(assign); @@ -535,7 +527,7 @@ public class HandleSuperBuilder extends JavacAnnotationHandler { typeParamsForBuilderParameter.add(wildcard); wildcard = maker.Wildcard(maker.TypeBoundKind(BoundKind.UNBOUND), null); typeParamsForBuilderParameter.add(wildcard); - JCTypeApply paramType = maker.TypeApply(maker.Ident(builderClassname), typeParamsForBuilderParameter.toList()); + JCTypeApply paramType = maker.TypeApply(namePlusTypeParamsToTypeReference(maker, typeNode, builderClassname, false, List.nil()), typeParamsForBuilderParameter.toList()); JCVariableDecl param = maker.VarDef(maker.Modifiers(flags), builderVariableName, paramType, null); params.append(param); @@ -560,7 +552,7 @@ public class HandleSuperBuilder extends JavacAnnotationHandler { ListBuffer typeArgs = new ListBuffer(); for (JCTypeParameter typeParam : typeParams) typeArgs.append(maker.Ident(typeParam.name)); - JCExpression call = maker.NewClass(null, List.nil(), namePlusTypeParamsToTypeReference(maker, type.toName(builderImplClassName), typeParams), List.nil(), null); + JCExpression call = maker.NewClass(null, List.nil(), namePlusTypeParamsToTypeReference(maker, type, type.toName(builderImplClassName), false, typeParams), List.nil(), null); JCStatement statement = maker.Return(call); JCBlock body = maker.Block(0, List.of(statement)); @@ -574,7 +566,7 @@ public class HandleSuperBuilder extends JavacAnnotationHandler { JCWildcard wildcard = maker.Wildcard(maker.TypeBoundKind(BoundKind.UNBOUND), null); typeParameterNames.add(wildcard); typeParameterNames.add(wildcard); - JCTypeApply returnType = maker.TypeApply(maker.Ident(type.toName(builderClassName)), typeParameterNames.toList()); + JCTypeApply returnType = maker.TypeApply(namePlusTypeParamsToTypeReference(maker, type, type.toName(builderClassName), false, List.nil()), typeParameterNames.toList()); List annsOnMethod = cfv.generateUnique() ? List.of(maker.Annotation(genTypeRef(type, CheckerFrameworkVersion.NAME__SIDE_EFFECT_FREE), List.nil())) : List.nil(); return maker.MethodDef(maker.Modifiers(modifiers, annsOnMethod), type.toName(builderMethodName), returnType, copyTypeParams(source, typeParams), List.nil(), List.nil(), body, null); @@ -594,7 +586,7 @@ public class HandleSuperBuilder extends JavacAnnotationHandler { ListBuffer typeArgs = new ListBuffer(); for (JCTypeParameter typeParam : typeParams) typeArgs.append(maker.Ident(typeParam.name)); - JCExpression newClass = maker.NewClass(null, List.nil(), namePlusTypeParamsToTypeReference(maker, type.toName(builderImplClassName), typeParams), List.nil(), null); + JCExpression newClass = maker.NewClass(null, List.nil(), namePlusTypeParamsToTypeReference(maker, type, type.toName(builderImplClassName), false, typeParams), List.nil(), null); List methodArgs = List.of(maker.Ident(type.toName("this"))); JCMethodInvocation invokeFillMethod = maker.Apply(List.nil(), maker.Select(newClass, type.toName(FILL_VALUES_METHOD_NAME)), methodArgs); JCStatement statement = maker.Return(invokeFillMethod); @@ -609,7 +601,7 @@ public class HandleSuperBuilder extends JavacAnnotationHandler { JCWildcard wildcard = maker.Wildcard(maker.TypeBoundKind(BoundKind.UNBOUND), null); typeParameterNames.add(wildcard); typeParameterNames.add(wildcard); - JCTypeApply returnType = maker.TypeApply(maker.Ident(type.toName(builderClassName)), typeParameterNames.toList()); + JCTypeApply returnType = maker.TypeApply(namePlusTypeParamsToTypeReference(maker, type, type.toName(builderClassName), false, List.nil()), typeParameterNames.toList()); List annsOnMethod = cfv.generateUnique() ? List.of(maker.Annotation(genTypeRef(type, CheckerFrameworkVersion.NAME__SIDE_EFFECT_FREE), List.nil())) : List.nil(); return maker.MethodDef(maker.Modifiers(modifiers, annsOnMethod), type.toName(TO_BUILDER_METHOD_NAME), returnType, List.nil(), List.nil(), List.nil(), body, null); @@ -651,8 +643,9 @@ public class HandleSuperBuilder extends JavacAnnotationHandler { } // Call the builder implemention's helper method that actually fills the values from the instance. + JCExpression ref = namePlusTypeParamsToTypeReference(maker, type, type.toName(builderImplClassName), false, List.nil()); JCMethodInvocation callStaticFillValuesMethod = maker.Apply(List.nil(), - maker.Select(maker.Ident(type.toName(builderImplClassName)), type.toName(STATIC_FILL_VALUES_METHOD_NAME)), + maker.Select(ref, type.toName(STATIC_FILL_VALUES_METHOD_NAME)), List.of(maker.Ident(type.toName(INSTANCE_VARIABLE_NAME)), maker.Ident(type.toName("this")))); body.append(maker.Exec(callStaticFillValuesMethod)); @@ -692,7 +685,7 @@ public class HandleSuperBuilder extends JavacAnnotationHandler { typeParamsForBuilderParameter.add(wildcard); wildcard = maker.Wildcard(maker.TypeBoundKind(BoundKind.UNBOUND), null); typeParamsForBuilderParameter.add(wildcard); - JCTypeApply builderType = maker.TypeApply(maker.Ident(type.toName(builderClassname)), typeParamsForBuilderParameter.toList()); + JCTypeApply builderType = maker.TypeApply(namePlusTypeParamsToTypeReference(maker, type, type.toName(builderClassname), false, List.nil()), typeParamsForBuilderParameter.toList()); JCVariableDecl paramBuilder = maker.VarDef(maker.Modifiers(Flags.LocalVarFlags), type.toName(BUILDER_VARIABLE_NAME), builderType, null); ListBuffer body = new ListBuffer(); @@ -717,7 +710,8 @@ public class HandleSuperBuilder extends JavacAnnotationHandler { } else { if (bfd.obtainVia.isStatic()) { for (int i = 0; i < tgt.length; i++) { - JCExpression c = maker.Select(maker.Ident(type.toName(type.getName())), type.toName(bfd.obtainVia.method())); + JCExpression typeRef = namePlusTypeParamsToTypeReference(maker, type, List.nil()); + JCExpression c = maker.Select(typeRef, type.toName(bfd.obtainVia.method())); tgt[i] = maker.Apply(List.nil(), c, List.of(maker.Ident(type.toName(INSTANCE_VARIABLE_NAME)))); } } else { @@ -772,7 +766,7 @@ public class HandleSuperBuilder extends JavacAnnotationHandler { JCModifiers modifiers = maker.Modifiers(Flags.PROTECTED, annsOnMethod); Name name = builderImplType.toName(SELF_METHOD); - JCExpression returnType = namePlusTypeParamsToTypeReference(maker, builderImplType.toName(builderImplType.getName()), typeParams); + JCExpression returnType = namePlusTypeParamsToTypeReference(maker, builderImplType.up(), builderImplType.toName(builderImplType.getName()), false, typeParams); JCStatement statement = maker.Return(maker.Ident(builderImplType.toName("this"))); JCBlock body = maker.Block(0, List.of(statement)); @@ -908,7 +902,8 @@ public class HandleSuperBuilder extends JavacAnnotationHandler { if (cfv.generateCalledMethods()) { JCAnnotation ncAnno = maker.Annotation(genTypeRef(source, CheckerFrameworkVersion.NAME__NOT_CALLED), List.of(maker.Literal(newMethod.getName().toString()))); JCClassDecl builderTypeNode = (JCClassDecl) builderType.get(); - JCVariableDecl recv = maker.VarDef(maker.Modifiers(0L, List.of(ncAnno)), builderType.toName("this"), maker.Ident(builderTypeNode.name), null); + JCExpression selfType = namePlusTypeParamsToTypeReference(maker, builderType, builderTypeNode.typarams); + JCVariableDecl recv = maker.VarDef(maker.Modifiers(0L, List.of(ncAnno)), builderType.toName("this"), selfType, null); newMethod.params = List.of(recv, newMethod.params.get(0)); } if (cfv.generateReturnsReceiver()) { diff --git a/src/core/lombok/javac/handlers/JavacHandlerUtil.java b/src/core/lombok/javac/handlers/JavacHandlerUtil.java index d12a980f..885d8ffb 100644 --- a/src/core/lombok/javac/handlers/JavacHandlerUtil.java +++ b/src/core/lombok/javac/handlers/JavacHandlerUtil.java @@ -622,20 +622,7 @@ public class JavacHandlerUtil { JavacNode typeNode = childOfType; JavacTreeMaker maker = childOfType.getTreeMaker(); while (typeNode != null && typeNode.getKind() != Kind.TYPE) typeNode = typeNode.up(); - if (typeNode != null && typeNode.get() instanceof JCClassDecl) { - JCClassDecl type = (JCClassDecl) typeNode.get(); - ListBuffer typeArgs = new ListBuffer(); - if (!type.typarams.isEmpty()) { - for (JCTypeParameter tp : type.typarams) { - typeArgs.append(maker.Ident(tp.name)); - } - return maker.TypeApply(maker.Ident(type.name), typeArgs.toList()); - } else { - return maker.Ident(type.name); - } - } else { - return null; - } + return JavacHandlerUtil.namePlusTypeParamsToTypeReference(maker, typeNode, ((JCClassDecl) typeNode.get()).typarams); } public static boolean isBoolean(JavacNode field) { @@ -1722,11 +1709,25 @@ public class JavacHandlerUtil { return JCAnnotatedTypeReflect.getUnderlyingType(from); } - public static JCExpression namePlusTypeParamsToTypeReference(JavacTreeMaker maker, Name typeName, List params) { - if (params.isEmpty()) { - return maker.Ident(typeName); + public static JCExpression namePlusTypeParamsToTypeReference(JavacTreeMaker maker, JavacNode type, List params) { + JCClassDecl td = (JCClassDecl) type.get(); + boolean instance = (td.mods.flags & Flags.STATIC) == 0; + return namePlusTypeParamsToTypeReference(maker, type.up(), td.name, instance, params); + } + + public static JCExpression namePlusTypeParamsToTypeReference(JavacTreeMaker maker, JavacNode parentType, Name typeName, boolean instance, List params) { + JCExpression r = null; + + if (parentType != null && parentType.getKind() == Kind.TYPE) { + JCClassDecl td = (JCClassDecl) parentType.get(); + boolean outerInstance = instance && ((td.mods.flags & Flags.STATIC) == 0); + List outerParams = instance ? td.typarams : List.nil(); + r = namePlusTypeParamsToTypeReference(maker, parentType.up(), td.name, outerInstance, outerParams); } - return maker.TypeApply(maker.Ident(typeName), typeParameterNames(maker, params)); + + r = r == null ? maker.Ident(typeName) : maker.Select(r, typeName); + if (!params.isEmpty()) r = maker.TypeApply(r, typeParameterNames(maker, params)); + return r; } public static List typeParameterNames(JavacTreeMaker maker, List params) { diff --git a/test/transform/resource/after-delombok/BuilderComplex.java b/test/transform/resource/after-delombok/BuilderComplex.java index c63d7b59..a82a0497 100644 --- a/test/transform/resource/after-delombok/BuilderComplex.java +++ b/test/transform/resource/after-delombok/BuilderComplex.java @@ -16,22 +16,22 @@ class BuilderComplex { TestVoidName() { } @java.lang.SuppressWarnings("all") - public TestVoidName number(final T number) { + public BuilderComplex.TestVoidName number(final T number) { this.number = number; return this; } @java.lang.SuppressWarnings("all") - public TestVoidName arg2(final int arg2) { + public BuilderComplex.TestVoidName arg2(final int arg2) { this.arg2 = arg2; return this; } @java.lang.SuppressWarnings("all") - public TestVoidName arg3(final String arg3) { + public BuilderComplex.TestVoidName arg3(final String arg3) { this.arg3 = arg3; return this; } @java.lang.SuppressWarnings("all") - public TestVoidName selfRef(final BuilderComplex selfRef) { + public BuilderComplex.TestVoidName selfRef(final BuilderComplex selfRef) { this.selfRef = selfRef; return this; } @@ -46,7 +46,7 @@ class BuilderComplex { } } @java.lang.SuppressWarnings("all") - public static TestVoidName builder() { - return new TestVoidName(); + public static BuilderComplex.TestVoidName builder() { + return new BuilderComplex.TestVoidName(); } } diff --git a/test/transform/resource/after-delombok/BuilderCustomName.java b/test/transform/resource/after-delombok/BuilderCustomName.java index 4db08220..4b423ee0 100644 --- a/test/transform/resource/after-delombok/BuilderCustomName.java +++ b/test/transform/resource/after-delombok/BuilderCustomName.java @@ -2,7 +2,7 @@ import java.util.List; class BuilderCustomName { private final int field; @java.lang.SuppressWarnings("all") - public static abstract class SimpleTestBuilder, B extends SimpleTestBuilder> { + public static abstract class SimpleTestBuilder, B extends BuilderCustomName.SimpleTestBuilder> { @java.lang.SuppressWarnings("all") private int field; @java.lang.SuppressWarnings("all") @@ -21,13 +21,13 @@ class BuilderCustomName { } } @java.lang.SuppressWarnings("all") - private static final class SimpleTestBuilderImpl extends SimpleTestBuilder, SimpleTestBuilderImpl> { + private static final class SimpleTestBuilderImpl extends BuilderCustomName.SimpleTestBuilder, BuilderCustomName.SimpleTestBuilderImpl> { @java.lang.SuppressWarnings("all") private SimpleTestBuilderImpl() { } @java.lang.Override @java.lang.SuppressWarnings("all") - protected SimpleTestBuilderImpl self() { + protected BuilderCustomName.SimpleTestBuilderImpl self() { return this; } @java.lang.Override @@ -37,11 +37,11 @@ class BuilderCustomName { } } @java.lang.SuppressWarnings("all") - protected BuilderCustomName(final SimpleTestBuilder b) { + protected BuilderCustomName(final BuilderCustomName.SimpleTestBuilder b) { this.field = b.field; } @java.lang.SuppressWarnings("all") - public static SimpleTestBuilder builder() { - return new SimpleTestBuilderImpl(); + public static BuilderCustomName.SimpleTestBuilder builder() { + return new BuilderCustomName.SimpleTestBuilderImpl(); } } \ No newline at end of file diff --git a/test/transform/resource/after-delombok/BuilderDefaults.java b/test/transform/resource/after-delombok/BuilderDefaults.java index 475b3f3c..eb692267 100644 --- a/test/transform/resource/after-delombok/BuilderDefaults.java +++ b/test/transform/resource/after-delombok/BuilderDefaults.java @@ -32,18 +32,18 @@ public final class BuilderDefaults { BuilderDefaultsBuilder() { } @java.lang.SuppressWarnings("all") - public BuilderDefaultsBuilder x(final int x) { + public BuilderDefaults.BuilderDefaultsBuilder x(final int x) { this.x$value = x; x$set = true; return this; } @java.lang.SuppressWarnings("all") - public BuilderDefaultsBuilder name(final String name) { + public BuilderDefaults.BuilderDefaultsBuilder name(final String name) { this.name = name; return this; } @java.lang.SuppressWarnings("all") - public BuilderDefaultsBuilder z(final long z) { + public BuilderDefaults.BuilderDefaultsBuilder z(final long z) { this.z$value = z; z$set = true; return this; @@ -63,8 +63,8 @@ public final class BuilderDefaults { } } @java.lang.SuppressWarnings("all") - public static BuilderDefaultsBuilder builder() { - return new BuilderDefaultsBuilder(); + public static BuilderDefaults.BuilderDefaultsBuilder builder() { + return new BuilderDefaults.BuilderDefaultsBuilder(); } @java.lang.SuppressWarnings("all") public int getX() { diff --git a/test/transform/resource/after-delombok/BuilderDefaultsGenerics.java b/test/transform/resource/after-delombok/BuilderDefaultsGenerics.java index 46fcd6b4..fb187e27 100644 --- a/test/transform/resource/after-delombok/BuilderDefaultsGenerics.java +++ b/test/transform/resource/after-delombok/BuilderDefaultsGenerics.java @@ -39,19 +39,19 @@ public class BuilderDefaultsGenerics> { BuilderDefaultsGenericsBuilder() { } @java.lang.SuppressWarnings("all") - public BuilderDefaultsGenericsBuilder callable(final java.util.concurrent.Callable callable) { + public BuilderDefaultsGenerics.BuilderDefaultsGenericsBuilder callable(final java.util.concurrent.Callable callable) { this.callable$value = callable; callable$set = true; return this; } @java.lang.SuppressWarnings("all") - public BuilderDefaultsGenericsBuilder tee(final T tee) { + public BuilderDefaultsGenerics.BuilderDefaultsGenericsBuilder tee(final T tee) { this.tee$value = tee; tee$set = true; return this; } @java.lang.SuppressWarnings("all") - public BuilderDefaultsGenericsBuilder arrr(final R arrr) { + public BuilderDefaultsGenerics.BuilderDefaultsGenericsBuilder arrr(final R arrr) { this.arrr$value = arrr; arrr$set = true; return this; @@ -73,7 +73,7 @@ public class BuilderDefaultsGenerics> { } } @java.lang.SuppressWarnings("all") - public static > BuilderDefaultsGenericsBuilder builder() { - return new BuilderDefaultsGenericsBuilder(); + public static > BuilderDefaultsGenerics.BuilderDefaultsGenericsBuilder builder() { + return new BuilderDefaultsGenerics.BuilderDefaultsGenericsBuilder(); } } diff --git a/test/transform/resource/after-delombok/BuilderDefaultsWarnings.java b/test/transform/resource/after-delombok/BuilderDefaultsWarnings.java index 7e645dc1..f00d42af 100644 --- a/test/transform/resource/after-delombok/BuilderDefaultsWarnings.java +++ b/test/transform/resource/after-delombok/BuilderDefaultsWarnings.java @@ -21,29 +21,29 @@ public class BuilderDefaultsWarnings { BuilderDefaultsWarningsBuilder() { } @java.lang.SuppressWarnings("all") - public BuilderDefaultsWarningsBuilder x(final long x) { + public BuilderDefaultsWarnings.BuilderDefaultsWarningsBuilder x(final long x) { this.x = x; return this; } @java.lang.SuppressWarnings("all") - public BuilderDefaultsWarningsBuilder z(final int z) { + public BuilderDefaultsWarnings.BuilderDefaultsWarningsBuilder z(final int z) { this.z = z; return this; } @java.lang.SuppressWarnings("all") - public BuilderDefaultsWarningsBuilder item(final String item) { + public BuilderDefaultsWarnings.BuilderDefaultsWarningsBuilder item(final String item) { if (this.items == null) this.items = new java.util.ArrayList(); this.items.add(item); return this; } @java.lang.SuppressWarnings("all") - public BuilderDefaultsWarningsBuilder items(final java.util.Collection items) { + public BuilderDefaultsWarnings.BuilderDefaultsWarningsBuilder items(final java.util.Collection items) { if (this.items == null) this.items = new java.util.ArrayList(); this.items.addAll(items); return this; } @java.lang.SuppressWarnings("all") - public BuilderDefaultsWarningsBuilder clearItems() { + public BuilderDefaultsWarnings.BuilderDefaultsWarningsBuilder clearItems() { if (this.items != null) this.items.clear(); return this; } @@ -69,8 +69,8 @@ public class BuilderDefaultsWarnings { } } @java.lang.SuppressWarnings("all") - public static BuilderDefaultsWarningsBuilder builder() { - return new BuilderDefaultsWarningsBuilder(); + public static BuilderDefaultsWarnings.BuilderDefaultsWarningsBuilder builder() { + return new BuilderDefaultsWarnings.BuilderDefaultsWarningsBuilder(); } } class NoBuilderButHasDefaults { @@ -93,7 +93,7 @@ class NoBuilderButHasDefaults { } } @java.lang.SuppressWarnings("all") - public static NoBuilderButHasDefaultsBuilder builder() { - return new NoBuilderButHasDefaultsBuilder(); + public static NoBuilderButHasDefaults.NoBuilderButHasDefaultsBuilder builder() { + return new NoBuilderButHasDefaults.NoBuilderButHasDefaultsBuilder(); } } diff --git a/test/transform/resource/after-delombok/BuilderGenericMethod.java b/test/transform/resource/after-delombok/BuilderGenericMethod.java index f70ae871..053e8ce4 100644 --- a/test/transform/resource/after-delombok/BuilderGenericMethod.java +++ b/test/transform/resource/after-delombok/BuilderGenericMethod.java @@ -14,12 +14,12 @@ class BuilderGenericMethod { MapBuilder() { } @java.lang.SuppressWarnings("all") - public MapBuilder a(final int a) { + public BuilderGenericMethod.MapBuilder a(final int a) { this.a = a; return this; } @java.lang.SuppressWarnings("all") - public MapBuilder b(final long b) { + public BuilderGenericMethod.MapBuilder b(final long b) { this.b = b; return this; } @@ -34,7 +34,7 @@ class BuilderGenericMethod { } } @java.lang.SuppressWarnings("all") - public MapBuilder builder() { - return new MapBuilder(); + public BuilderGenericMethod.MapBuilder builder() { + return this.new MapBuilder(); } } diff --git a/test/transform/resource/after-delombok/BuilderInstanceMethod.java b/test/transform/resource/after-delombok/BuilderInstanceMethod.java index 12b76a8f..9389d871 100644 --- a/test/transform/resource/after-delombok/BuilderInstanceMethod.java +++ b/test/transform/resource/after-delombok/BuilderInstanceMethod.java @@ -17,22 +17,22 @@ class BuilderInstanceMethod { StringBuilder() { } @java.lang.SuppressWarnings("all") - public StringBuilder show(final int show) { + public BuilderInstanceMethod.StringBuilder show(final int show) { this.show = show; return this; } @java.lang.SuppressWarnings("all") - public StringBuilder yes(final int yes) { + public BuilderInstanceMethod.StringBuilder yes(final int yes) { this.yes = yes; return this; } @java.lang.SuppressWarnings("all") - public StringBuilder also(final List also) { + public BuilderInstanceMethod.StringBuilder also(final List also) { this.also = also; return this; } @java.lang.SuppressWarnings("all") - public StringBuilder $andMe(final int $andMe) { + public BuilderInstanceMethod.StringBuilder $andMe(final int $andMe) { this.$andMe = $andMe; return this; } @@ -47,7 +47,7 @@ class BuilderInstanceMethod { } } @java.lang.SuppressWarnings("all") - public StringBuilder builder() { - return new StringBuilder(); + public BuilderInstanceMethod.StringBuilder builder() { + return this.new StringBuilder(); } } diff --git a/test/transform/resource/after-delombok/BuilderJavadoc.java b/test/transform/resource/after-delombok/BuilderJavadoc.java index 196ced3b..1e004e1e 100644 --- a/test/transform/resource/after-delombok/BuilderJavadoc.java +++ b/test/transform/resource/after-delombok/BuilderJavadoc.java @@ -54,7 +54,7 @@ class BuilderJavadoc { * @param tag is moved to the setter. */ @java.lang.SuppressWarnings("all") - public BuilderJavadocBuilder basic(final int basic) { + public BuilderJavadoc.BuilderJavadocBuilder basic(final int basic) { this.basic = basic; return this; } @@ -63,7 +63,7 @@ class BuilderJavadoc { * @param tag is moved to the setters and wither. */ @java.lang.SuppressWarnings("all") - public BuilderJavadocBuilder getsetwith(final int getsetwith) { + public BuilderJavadoc.BuilderJavadocBuilder getsetwith(final int getsetwith) { this.getsetwith = getsetwith; return this; } @@ -85,8 +85,8 @@ class BuilderJavadoc { this.predefWithJavadoc = predefWithJavadoc; } @java.lang.SuppressWarnings("all") - public static BuilderJavadocBuilder builder() { - return new BuilderJavadocBuilder(); + public static BuilderJavadoc.BuilderJavadocBuilder builder() { + return new BuilderJavadoc.BuilderJavadocBuilder(); } /** * getsetwith gets a builder setter, an instance getter and setter, and a wither. diff --git a/test/transform/resource/after-delombok/BuilderSimple.java b/test/transform/resource/after-delombok/BuilderSimple.java index 4cd20b23..2c031af0 100644 --- a/test/transform/resource/after-delombok/BuilderSimple.java +++ b/test/transform/resource/after-delombok/BuilderSimple.java @@ -19,12 +19,12 @@ class BuilderSimple { BuilderSimpleBuilder() { } @java.lang.SuppressWarnings("all") - public BuilderSimpleBuilder yes(final int yes) { + public BuilderSimple.BuilderSimpleBuilder yes(final int yes) { this.yes = yes; return this; } @java.lang.SuppressWarnings("all") - public BuilderSimpleBuilder also(final List also) { + public BuilderSimple.BuilderSimpleBuilder also(final List also) { this.also = also; return this; } @@ -39,7 +39,7 @@ class BuilderSimple { } } @java.lang.SuppressWarnings("all") - protected static BuilderSimpleBuilder builder() { - return new BuilderSimpleBuilder(); + protected static BuilderSimple.BuilderSimpleBuilder builder() { + return new BuilderSimple.BuilderSimpleBuilder(); } } diff --git a/test/transform/resource/after-delombok/BuilderSimpleWithSetterPrefix.java b/test/transform/resource/after-delombok/BuilderSimpleWithSetterPrefix.java index 24ca09d6..873fa928 100644 --- a/test/transform/resource/after-delombok/BuilderSimpleWithSetterPrefix.java +++ b/test/transform/resource/after-delombok/BuilderSimpleWithSetterPrefix.java @@ -13,7 +13,7 @@ class BuilderSimpleWithSetterPrefix { BuilderSimpleWithSetterPrefixBuilder() { } @java.lang.SuppressWarnings("all") - public BuilderSimpleWithSetterPrefixBuilder withUnprefixed(final int unprefixed) { + public BuilderSimpleWithSetterPrefix.BuilderSimpleWithSetterPrefixBuilder withUnprefixed(final int unprefixed) { this.unprefixed = unprefixed; return this; } @@ -28,7 +28,7 @@ class BuilderSimpleWithSetterPrefix { } } @java.lang.SuppressWarnings("all") - protected static BuilderSimpleWithSetterPrefixBuilder builder() { - return new BuilderSimpleWithSetterPrefixBuilder(); + protected static BuilderSimpleWithSetterPrefix.BuilderSimpleWithSetterPrefixBuilder builder() { + return new BuilderSimpleWithSetterPrefix.BuilderSimpleWithSetterPrefixBuilder(); } } diff --git a/test/transform/resource/after-delombok/BuilderSingularAnnotatedTypes.java b/test/transform/resource/after-delombok/BuilderSingularAnnotatedTypes.java index 88459e67..6bd3390c 100644 --- a/test/transform/resource/after-delombok/BuilderSingularAnnotatedTypes.java +++ b/test/transform/resource/after-delombok/BuilderSingularAnnotatedTypes.java @@ -26,7 +26,7 @@ class BuilderSingularAnnotatedTypes { BuilderSingularAnnotatedTypesBuilder() { } @java.lang.SuppressWarnings("all") - public BuilderSingularAnnotatedTypesBuilder foo(@MyAnnotation @NonNull final String foo) { + public BuilderSingularAnnotatedTypes.BuilderSingularAnnotatedTypesBuilder foo(@MyAnnotation @NonNull final String foo) { if (foo == null) { throw new java.lang.NullPointerException("foo is marked non-null but is null"); } @@ -35,18 +35,18 @@ class BuilderSingularAnnotatedTypes { return this; } @java.lang.SuppressWarnings("all") - public BuilderSingularAnnotatedTypesBuilder foos(final java.util.Collection foos) { + public BuilderSingularAnnotatedTypes.BuilderSingularAnnotatedTypesBuilder foos(final java.util.Collection foos) { if (this.foos == null) this.foos = new java.util.ArrayList<@MyAnnotation @NonNull String>(); this.foos.addAll(foos); return this; } @java.lang.SuppressWarnings("all") - public BuilderSingularAnnotatedTypesBuilder clearFoos() { + public BuilderSingularAnnotatedTypes.BuilderSingularAnnotatedTypesBuilder clearFoos() { if (this.foos != null) this.foos.clear(); return this; } @java.lang.SuppressWarnings("all") - public BuilderSingularAnnotatedTypesBuilder bar(@MyAnnotation @NonNull final String barKey, @MyAnnotation @NonNull final Integer barValue) { + public BuilderSingularAnnotatedTypes.BuilderSingularAnnotatedTypesBuilder bar(@MyAnnotation @NonNull final String barKey, @MyAnnotation @NonNull final Integer barValue) { if (barKey == null) { throw new java.lang.NullPointerException("barKey is marked non-null but is null"); } @@ -62,7 +62,7 @@ class BuilderSingularAnnotatedTypes { return this; } @java.lang.SuppressWarnings("all") - public BuilderSingularAnnotatedTypesBuilder bars(final java.util.Map bars) { + public BuilderSingularAnnotatedTypes.BuilderSingularAnnotatedTypesBuilder bars(final java.util.Map bars) { if (this.bars$key == null) { this.bars$key = new java.util.ArrayList<@MyAnnotation @NonNull String>(); this.bars$value = new java.util.ArrayList<@MyAnnotation @NonNull Integer>(); @@ -74,7 +74,7 @@ class BuilderSingularAnnotatedTypes { return this; } @java.lang.SuppressWarnings("all") - public BuilderSingularAnnotatedTypesBuilder clearBars() { + public BuilderSingularAnnotatedTypes.BuilderSingularAnnotatedTypesBuilder clearBars() { if (this.bars$key != null) { this.bars$key.clear(); this.bars$value.clear(); @@ -118,7 +118,7 @@ class BuilderSingularAnnotatedTypes { } } @java.lang.SuppressWarnings("all") - public static BuilderSingularAnnotatedTypesBuilder builder() { - return new BuilderSingularAnnotatedTypesBuilder(); + public static BuilderSingularAnnotatedTypes.BuilderSingularAnnotatedTypesBuilder builder() { + return new BuilderSingularAnnotatedTypes.BuilderSingularAnnotatedTypesBuilder(); } } \ No newline at end of file diff --git a/test/transform/resource/after-delombok/BuilderSingularAnnotatedTypesWithSetterPrefix.java b/test/transform/resource/after-delombok/BuilderSingularAnnotatedTypesWithSetterPrefix.java index 6e9c2cee..d1047567 100644 --- a/test/transform/resource/after-delombok/BuilderSingularAnnotatedTypesWithSetterPrefix.java +++ b/test/transform/resource/after-delombok/BuilderSingularAnnotatedTypesWithSetterPrefix.java @@ -26,7 +26,7 @@ class BuilderSingularAnnotatedTypesWithSetterPrefix { BuilderSingularAnnotatedTypesWithSetterPrefixBuilder() { } @java.lang.SuppressWarnings("all") - public BuilderSingularAnnotatedTypesWithSetterPrefixBuilder withFoo(@MyAnnotation @NonNull final String foo) { + public BuilderSingularAnnotatedTypesWithSetterPrefix.BuilderSingularAnnotatedTypesWithSetterPrefixBuilder withFoo(@MyAnnotation @NonNull final String foo) { if (foo == null) { throw new java.lang.NullPointerException("foo is marked non-null but is null"); } @@ -35,18 +35,18 @@ class BuilderSingularAnnotatedTypesWithSetterPrefix { return this; } @java.lang.SuppressWarnings("all") - public BuilderSingularAnnotatedTypesWithSetterPrefixBuilder withFoos(final java.util.Collection foos) { + public BuilderSingularAnnotatedTypesWithSetterPrefix.BuilderSingularAnnotatedTypesWithSetterPrefixBuilder withFoos(final java.util.Collection foos) { if (this.foos == null) this.foos = new java.util.ArrayList<@MyAnnotation @NonNull String>(); this.foos.addAll(foos); return this; } @java.lang.SuppressWarnings("all") - public BuilderSingularAnnotatedTypesWithSetterPrefixBuilder clearFoos() { + public BuilderSingularAnnotatedTypesWithSetterPrefix.BuilderSingularAnnotatedTypesWithSetterPrefixBuilder clearFoos() { if (this.foos != null) this.foos.clear(); return this; } @java.lang.SuppressWarnings("all") - public BuilderSingularAnnotatedTypesWithSetterPrefixBuilder withBar(@MyAnnotation @NonNull final String barKey, @MyAnnotation @NonNull final Integer barValue) { + public BuilderSingularAnnotatedTypesWithSetterPrefix.BuilderSingularAnnotatedTypesWithSetterPrefixBuilder withBar(@MyAnnotation @NonNull final String barKey, @MyAnnotation @NonNull final Integer barValue) { if (barKey == null) { throw new java.lang.NullPointerException("barKey is marked non-null but is null"); } @@ -62,7 +62,7 @@ class BuilderSingularAnnotatedTypesWithSetterPrefix { return this; } @java.lang.SuppressWarnings("all") - public BuilderSingularAnnotatedTypesWithSetterPrefixBuilder withBars(final java.util.Map bars) { + public BuilderSingularAnnotatedTypesWithSetterPrefix.BuilderSingularAnnotatedTypesWithSetterPrefixBuilder withBars(final java.util.Map bars) { if (this.bars$key == null) { this.bars$key = new java.util.ArrayList<@MyAnnotation @NonNull String>(); this.bars$value = new java.util.ArrayList<@MyAnnotation @NonNull Integer>(); @@ -74,7 +74,7 @@ class BuilderSingularAnnotatedTypesWithSetterPrefix { return this; } @java.lang.SuppressWarnings("all") - public BuilderSingularAnnotatedTypesWithSetterPrefixBuilder clearBars() { + public BuilderSingularAnnotatedTypesWithSetterPrefix.BuilderSingularAnnotatedTypesWithSetterPrefixBuilder clearBars() { if (this.bars$key != null) { this.bars$key.clear(); this.bars$value.clear(); @@ -118,7 +118,7 @@ class BuilderSingularAnnotatedTypesWithSetterPrefix { } } @java.lang.SuppressWarnings("all") - public static BuilderSingularAnnotatedTypesWithSetterPrefixBuilder builder() { - return new BuilderSingularAnnotatedTypesWithSetterPrefixBuilder(); + public static BuilderSingularAnnotatedTypesWithSetterPrefix.BuilderSingularAnnotatedTypesWithSetterPrefixBuilder builder() { + return new BuilderSingularAnnotatedTypesWithSetterPrefix.BuilderSingularAnnotatedTypesWithSetterPrefixBuilder(); } } diff --git a/test/transform/resource/after-delombok/BuilderSingularGuavaListsSets.java b/test/transform/resource/after-delombok/BuilderSingularGuavaListsSets.java index cf90e883..b6fb5732 100644 --- a/test/transform/resource/after-delombok/BuilderSingularGuavaListsSets.java +++ b/test/transform/resource/after-delombok/BuilderSingularGuavaListsSets.java @@ -34,87 +34,87 @@ class BuilderSingularGuavaListsSets { BuilderSingularGuavaListsSetsBuilder() { } @java.lang.SuppressWarnings("all") - public BuilderSingularGuavaListsSetsBuilder card(final T card) { + public BuilderSingularGuavaListsSets.BuilderSingularGuavaListsSetsBuilder card(final T card) { if (this.cards == null) this.cards = com.google.common.collect.ImmutableList.builder(); this.cards.add(card); return this; } @java.lang.SuppressWarnings("all") - public BuilderSingularGuavaListsSetsBuilder cards(final java.lang.Iterable cards) { + public BuilderSingularGuavaListsSets.BuilderSingularGuavaListsSetsBuilder cards(final java.lang.Iterable cards) { if (this.cards == null) this.cards = com.google.common.collect.ImmutableList.builder(); this.cards.addAll(cards); return this; } @java.lang.SuppressWarnings("all") - public BuilderSingularGuavaListsSetsBuilder clearCards() { + public BuilderSingularGuavaListsSets.BuilderSingularGuavaListsSetsBuilder clearCards() { this.cards = null; return this; } @java.lang.SuppressWarnings("all") - public BuilderSingularGuavaListsSetsBuilder frog(final Number frog) { + public BuilderSingularGuavaListsSets.BuilderSingularGuavaListsSetsBuilder frog(final Number frog) { if (this.frogs == null) this.frogs = com.google.common.collect.ImmutableList.builder(); this.frogs.add(frog); return this; } @java.lang.SuppressWarnings("all") - public BuilderSingularGuavaListsSetsBuilder frogs(final java.lang.Iterable frogs) { + public BuilderSingularGuavaListsSets.BuilderSingularGuavaListsSetsBuilder frogs(final java.lang.Iterable frogs) { if (this.frogs == null) this.frogs = com.google.common.collect.ImmutableList.builder(); this.frogs.addAll(frogs); return this; } @java.lang.SuppressWarnings("all") - public BuilderSingularGuavaListsSetsBuilder clearFrogs() { + public BuilderSingularGuavaListsSets.BuilderSingularGuavaListsSetsBuilder clearFrogs() { this.frogs = null; return this; } @java.lang.SuppressWarnings("all") - public BuilderSingularGuavaListsSetsBuilder rawSet(final java.lang.Object rawSet) { + public BuilderSingularGuavaListsSets.BuilderSingularGuavaListsSetsBuilder rawSet(final java.lang.Object rawSet) { if (this.rawSet == null) this.rawSet = com.google.common.collect.ImmutableSet.builder(); this.rawSet.add(rawSet); return this; } @java.lang.SuppressWarnings("all") - public BuilderSingularGuavaListsSetsBuilder rawSet(final java.lang.Iterable rawSet) { + public BuilderSingularGuavaListsSets.BuilderSingularGuavaListsSetsBuilder rawSet(final java.lang.Iterable rawSet) { if (this.rawSet == null) this.rawSet = com.google.common.collect.ImmutableSet.builder(); this.rawSet.addAll(rawSet); return this; } @java.lang.SuppressWarnings("all") - public BuilderSingularGuavaListsSetsBuilder clearRawSet() { + public BuilderSingularGuavaListsSets.BuilderSingularGuavaListsSetsBuilder clearRawSet() { this.rawSet = null; return this; } @java.lang.SuppressWarnings("all") - public BuilderSingularGuavaListsSetsBuilder pass(final String pass) { + public BuilderSingularGuavaListsSets.BuilderSingularGuavaListsSetsBuilder pass(final String pass) { if (this.passes == null) this.passes = com.google.common.collect.ImmutableSortedSet.naturalOrder(); this.passes.add(pass); return this; } @java.lang.SuppressWarnings("all") - public BuilderSingularGuavaListsSetsBuilder passes(final java.lang.Iterable passes) { + public BuilderSingularGuavaListsSets.BuilderSingularGuavaListsSetsBuilder passes(final java.lang.Iterable passes) { if (this.passes == null) this.passes = com.google.common.collect.ImmutableSortedSet.naturalOrder(); this.passes.addAll(passes); return this; } @java.lang.SuppressWarnings("all") - public BuilderSingularGuavaListsSetsBuilder clearPasses() { + public BuilderSingularGuavaListsSets.BuilderSingularGuavaListsSetsBuilder clearPasses() { this.passes = null; return this; } @java.lang.SuppressWarnings("all") - public BuilderSingularGuavaListsSetsBuilder user(final Number rowKey, final Number columnKey, final String value) { + public BuilderSingularGuavaListsSets.BuilderSingularGuavaListsSetsBuilder user(final Number rowKey, final Number columnKey, final String value) { if (this.users == null) this.users = com.google.common.collect.ImmutableTable.builder(); this.users.put(rowKey, columnKey, value); return this; } @java.lang.SuppressWarnings("all") - public BuilderSingularGuavaListsSetsBuilder users(final com.google.common.collect.Table users) { + public BuilderSingularGuavaListsSets.BuilderSingularGuavaListsSetsBuilder users(final com.google.common.collect.Table users) { if (this.users == null) this.users = com.google.common.collect.ImmutableTable.builder(); this.users.putAll(users); return this; } @java.lang.SuppressWarnings("all") - public BuilderSingularGuavaListsSetsBuilder clearUsers() { + public BuilderSingularGuavaListsSets.BuilderSingularGuavaListsSetsBuilder clearUsers() { this.users = null; return this; } @@ -134,7 +134,7 @@ class BuilderSingularGuavaListsSets { } } @java.lang.SuppressWarnings("all") - public static BuilderSingularGuavaListsSetsBuilder builder() { - return new BuilderSingularGuavaListsSetsBuilder(); + public static BuilderSingularGuavaListsSets.BuilderSingularGuavaListsSetsBuilder builder() { + return new BuilderSingularGuavaListsSets.BuilderSingularGuavaListsSetsBuilder(); } } diff --git a/test/transform/resource/after-delombok/BuilderSingularGuavaListsSetsWithSetterPrefix.java b/test/transform/resource/after-delombok/BuilderSingularGuavaListsSetsWithSetterPrefix.java deleted file mode 100644 index b349b160..00000000 --- a/test/transform/resource/after-delombok/BuilderSingularGuavaListsSetsWithSetterPrefix.java +++ /dev/null @@ -1,140 +0,0 @@ -import com.google.common.collect.ImmutableList; -import com.google.common.collect.ImmutableCollection; -import com.google.common.collect.ImmutableSet; -import com.google.common.collect.ImmutableSortedSet; -import com.google.common.collect.ImmutableTable; -class BuilderSingularGuavaListsSetsWithSetterPrefix { - private ImmutableList cards; - private ImmutableCollection frogs; - @SuppressWarnings("all") - private ImmutableSet rawSet; - private ImmutableSortedSet passes; - private ImmutableTable users; - @java.lang.SuppressWarnings("all") - BuilderSingularGuavaListsSetsWithSetterPrefix(final ImmutableList cards, final ImmutableCollection frogs, final ImmutableSet rawSet, final ImmutableSortedSet passes, final ImmutableTable users) { - this.cards = cards; - this.frogs = frogs; - this.rawSet = rawSet; - this.passes = passes; - this.users = users; - } - @java.lang.SuppressWarnings("all") - public static class BuilderSingularGuavaListsSetsWithSetterPrefixBuilder { - @java.lang.SuppressWarnings("all") - private com.google.common.collect.ImmutableList.Builder cards; - @java.lang.SuppressWarnings("all") - private com.google.common.collect.ImmutableList.Builder frogs; - @java.lang.SuppressWarnings("all") - private com.google.common.collect.ImmutableSet.Builder rawSet; - @java.lang.SuppressWarnings("all") - private com.google.common.collect.ImmutableSortedSet.Builder passes; - @java.lang.SuppressWarnings("all") - private com.google.common.collect.ImmutableTable.Builder users; - @java.lang.SuppressWarnings("all") - BuilderSingularGuavaListsSetsWithSetterPrefixBuilder() { - } - @java.lang.SuppressWarnings("all") - public BuilderSingularGuavaListsSetsWithSetterPrefixBuilder withCard(final T card) { - if (this.cards == null) this.cards = com.google.common.collect.ImmutableList.builder(); - this.cards.add(card); - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderSingularGuavaListsSetsWithSetterPrefixBuilder withCards(final java.lang.Iterable cards) { - if (this.cards == null) this.cards = com.google.common.collect.ImmutableList.builder(); - this.cards.addAll(cards); - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderSingularGuavaListsSetsWithSetterPrefixBuilder clearCards() { - this.cards = null; - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderSingularGuavaListsSetsWithSetterPrefixBuilder withFrog(final Number frog) { - if (this.frogs == null) this.frogs = com.google.common.collect.ImmutableList.builder(); - this.frogs.add(frog); - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderSingularGuavaListsSetsWithSetterPrefixBuilder withFrogs(final java.lang.Iterable frogs) { - if (this.frogs == null) this.frogs = com.google.common.collect.ImmutableList.builder(); - this.frogs.addAll(frogs); - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderSingularGuavaListsSetsWithSetterPrefixBuilder clearFrogs() { - this.frogs = null; - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderSingularGuavaListsSetsWithSetterPrefixBuilder withRawSet(final java.lang.Object rawSet) { - if (this.rawSet == null) this.rawSet = com.google.common.collect.ImmutableSet.builder(); - this.rawSet.add(rawSet); - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderSingularGuavaListsSetsWithSetterPrefixBuilder withRawSet(final java.lang.Iterable rawSet) { - if (this.rawSet == null) this.rawSet = com.google.common.collect.ImmutableSet.builder(); - this.rawSet.addAll(rawSet); - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderSingularGuavaListsSetsWithSetterPrefixBuilder clearRawSet() { - this.rawSet = null; - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderSingularGuavaListsSetsWithSetterPrefixBuilder withPass(final String pass) { - if (this.passes == null) this.passes = com.google.common.collect.ImmutableSortedSet.naturalOrder(); - this.passes.add(pass); - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderSingularGuavaListsSetsWithSetterPrefixBuilder withPasses(final java.lang.Iterable passes) { - if (this.passes == null) this.passes = com.google.common.collect.ImmutableSortedSet.naturalOrder(); - this.passes.addAll(passes); - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderSingularGuavaListsSetsWithSetterPrefixBuilder clearPasses() { - this.passes = null; - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderSingularGuavaListsSetsWithSetterPrefixBuilder withUser(final Number rowKey, final Number columnKey, final String value) { - if (this.users == null) this.users = com.google.common.collect.ImmutableTable.builder(); - this.users.put(rowKey, columnKey, value); - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderSingularGuavaListsSetsWithSetterPrefixBuilder withUsers(final com.google.common.collect.Table users) { - if (this.users == null) this.users = com.google.common.collect.ImmutableTable.builder(); - this.users.putAll(users); - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderSingularGuavaListsSetsWithSetterPrefixBuilder clearUsers() { - this.users = null; - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderSingularGuavaListsSetsWithSetterPrefix build() { - com.google.common.collect.ImmutableList cards = this.cards == null ? com.google.common.collect.ImmutableList.of() : this.cards.build(); - com.google.common.collect.ImmutableCollection frogs = this.frogs == null ? com.google.common.collect.ImmutableList.of() : this.frogs.build(); - com.google.common.collect.ImmutableSet rawSet = this.rawSet == null ? com.google.common.collect.ImmutableSet.of() : this.rawSet.build(); - com.google.common.collect.ImmutableSortedSet passes = this.passes == null ? com.google.common.collect.ImmutableSortedSet.of() : this.passes.build(); - com.google.common.collect.ImmutableTable users = this.users == null ? com.google.common.collect.ImmutableTable.of() : this.users.build(); - return new BuilderSingularGuavaListsSetsWithSetterPrefix(cards, frogs, rawSet, passes, users); - } - @java.lang.Override - @java.lang.SuppressWarnings("all") - public java.lang.String toString() { - return "BuilderSingularGuavaListsSetsWithSetterPrefix.BuilderSingularGuavaListsSetsWithSetterPrefixBuilder(cards=" + this.cards + ", frogs=" + this.frogs + ", rawSet=" + this.rawSet + ", passes=" + this.passes + ", users=" + this.users + ")"; - } - } - @java.lang.SuppressWarnings("all") - public static BuilderSingularGuavaListsSetsWithSetterPrefixBuilder builder() { - return new BuilderSingularGuavaListsSetsWithSetterPrefixBuilder(); - } -} diff --git a/test/transform/resource/after-delombok/BuilderSingularGuavaMaps.java b/test/transform/resource/after-delombok/BuilderSingularGuavaMaps.java index e29c7e94..a6043475 100644 --- a/test/transform/resource/after-delombok/BuilderSingularGuavaMaps.java +++ b/test/transform/resource/after-delombok/BuilderSingularGuavaMaps.java @@ -24,53 +24,53 @@ class BuilderSingularGuavaMaps { BuilderSingularGuavaMapsBuilder() { } @java.lang.SuppressWarnings("all") - public BuilderSingularGuavaMapsBuilder battleaxe(final K key, final V value) { + public BuilderSingularGuavaMaps.BuilderSingularGuavaMapsBuilder battleaxe(final K key, final V value) { if (this.battleaxes == null) this.battleaxes = com.google.common.collect.ImmutableMap.builder(); this.battleaxes.put(key, value); return this; } @java.lang.SuppressWarnings("all") - public BuilderSingularGuavaMapsBuilder battleaxes(final java.util.Map battleaxes) { + public BuilderSingularGuavaMaps.BuilderSingularGuavaMapsBuilder battleaxes(final java.util.Map battleaxes) { if (this.battleaxes == null) this.battleaxes = com.google.common.collect.ImmutableMap.builder(); this.battleaxes.putAll(battleaxes); return this; } @java.lang.SuppressWarnings("all") - public BuilderSingularGuavaMapsBuilder clearBattleaxes() { + public BuilderSingularGuavaMaps.BuilderSingularGuavaMapsBuilder clearBattleaxes() { this.battleaxes = null; return this; } @java.lang.SuppressWarnings("all") - public BuilderSingularGuavaMapsBuilder vertex(final Integer key, final V value) { + public BuilderSingularGuavaMaps.BuilderSingularGuavaMapsBuilder vertex(final Integer key, final V value) { if (this.vertices == null) this.vertices = com.google.common.collect.ImmutableSortedMap.naturalOrder(); this.vertices.put(key, value); return this; } @java.lang.SuppressWarnings("all") - public BuilderSingularGuavaMapsBuilder vertices(final java.util.Map vertices) { + public BuilderSingularGuavaMaps.BuilderSingularGuavaMapsBuilder vertices(final java.util.Map vertices) { if (this.vertices == null) this.vertices = com.google.common.collect.ImmutableSortedMap.naturalOrder(); this.vertices.putAll(vertices); return this; } @java.lang.SuppressWarnings("all") - public BuilderSingularGuavaMapsBuilder clearVertices() { + public BuilderSingularGuavaMaps.BuilderSingularGuavaMapsBuilder clearVertices() { this.vertices = null; return this; } @java.lang.SuppressWarnings("all") - public BuilderSingularGuavaMapsBuilder rawMap(final java.lang.Object key, final java.lang.Object value) { + public BuilderSingularGuavaMaps.BuilderSingularGuavaMapsBuilder rawMap(final java.lang.Object key, final java.lang.Object value) { if (this.rawMap == null) this.rawMap = com.google.common.collect.ImmutableBiMap.builder(); this.rawMap.put(key, value); return this; } @java.lang.SuppressWarnings("all") - public BuilderSingularGuavaMapsBuilder rawMap(final java.util.Map rawMap) { + public BuilderSingularGuavaMaps.BuilderSingularGuavaMapsBuilder rawMap(final java.util.Map rawMap) { if (this.rawMap == null) this.rawMap = com.google.common.collect.ImmutableBiMap.builder(); this.rawMap.putAll(rawMap); return this; } @java.lang.SuppressWarnings("all") - public BuilderSingularGuavaMapsBuilder clearRawMap() { + public BuilderSingularGuavaMaps.BuilderSingularGuavaMapsBuilder clearRawMap() { this.rawMap = null; return this; } @@ -88,7 +88,7 @@ class BuilderSingularGuavaMaps { } } @java.lang.SuppressWarnings("all") - public static BuilderSingularGuavaMapsBuilder builder() { - return new BuilderSingularGuavaMapsBuilder(); + public static BuilderSingularGuavaMaps.BuilderSingularGuavaMapsBuilder builder() { + return new BuilderSingularGuavaMaps.BuilderSingularGuavaMapsBuilder(); } } diff --git a/test/transform/resource/after-delombok/BuilderSingularGuavaMapsWithSetterPrefix.java b/test/transform/resource/after-delombok/BuilderSingularGuavaMapsWithSetterPrefix.java deleted file mode 100644 index b3162854..00000000 --- a/test/transform/resource/after-delombok/BuilderSingularGuavaMapsWithSetterPrefix.java +++ /dev/null @@ -1,94 +0,0 @@ -import com.google.common.collect.ImmutableMap; -import com.google.common.collect.ImmutableBiMap; -import com.google.common.collect.ImmutableSortedMap; -class BuilderSingularGuavaMapsWithSetterPrefix { - private ImmutableMap battleaxes; - private ImmutableSortedMap vertices; - @SuppressWarnings("all") - private ImmutableBiMap rawMap; - @java.lang.SuppressWarnings("all") - BuilderSingularGuavaMapsWithSetterPrefix(final ImmutableMap battleaxes, final ImmutableSortedMap vertices, final ImmutableBiMap rawMap) { - this.battleaxes = battleaxes; - this.vertices = vertices; - this.rawMap = rawMap; - } - @java.lang.SuppressWarnings("all") - public static class BuilderSingularGuavaMapsWithSetterPrefixBuilder { - @java.lang.SuppressWarnings("all") - private com.google.common.collect.ImmutableMap.Builder battleaxes; - @java.lang.SuppressWarnings("all") - private com.google.common.collect.ImmutableSortedMap.Builder vertices; - @java.lang.SuppressWarnings("all") - private com.google.common.collect.ImmutableBiMap.Builder rawMap; - @java.lang.SuppressWarnings("all") - BuilderSingularGuavaMapsWithSetterPrefixBuilder() { - } - @java.lang.SuppressWarnings("all") - public BuilderSingularGuavaMapsWithSetterPrefixBuilder withBattleaxe(final K key, final V value) { - if (this.battleaxes == null) this.battleaxes = com.google.common.collect.ImmutableMap.builder(); - this.battleaxes.put(key, value); - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderSingularGuavaMapsWithSetterPrefixBuilder withBattleaxes(final java.util.Map battleaxes) { - if (this.battleaxes == null) this.battleaxes = com.google.common.collect.ImmutableMap.builder(); - this.battleaxes.putAll(battleaxes); - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderSingularGuavaMapsWithSetterPrefixBuilder clearBattleaxes() { - this.battleaxes = null; - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderSingularGuavaMapsWithSetterPrefixBuilder withVertex(final Integer key, final V value) { - if (this.vertices == null) this.vertices = com.google.common.collect.ImmutableSortedMap.naturalOrder(); - this.vertices.put(key, value); - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderSingularGuavaMapsWithSetterPrefixBuilder withVertices(final java.util.Map vertices) { - if (this.vertices == null) this.vertices = com.google.common.collect.ImmutableSortedMap.naturalOrder(); - this.vertices.putAll(vertices); - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderSingularGuavaMapsWithSetterPrefixBuilder clearVertices() { - this.vertices = null; - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderSingularGuavaMapsWithSetterPrefixBuilder withRawMap(final java.lang.Object key, final java.lang.Object value) { - if (this.rawMap == null) this.rawMap = com.google.common.collect.ImmutableBiMap.builder(); - this.rawMap.put(key, value); - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderSingularGuavaMapsWithSetterPrefixBuilder withRawMap(final java.util.Map rawMap) { - if (this.rawMap == null) this.rawMap = com.google.common.collect.ImmutableBiMap.builder(); - this.rawMap.putAll(rawMap); - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderSingularGuavaMapsWithSetterPrefixBuilder clearRawMap() { - this.rawMap = null; - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderSingularGuavaMapsWithSetterPrefix build() { - com.google.common.collect.ImmutableMap battleaxes = this.battleaxes == null ? com.google.common.collect.ImmutableMap.of() : this.battleaxes.build(); - com.google.common.collect.ImmutableSortedMap vertices = this.vertices == null ? com.google.common.collect.ImmutableSortedMap.of() : this.vertices.build(); - com.google.common.collect.ImmutableBiMap rawMap = this.rawMap == null ? com.google.common.collect.ImmutableBiMap.of() : this.rawMap.build(); - return new BuilderSingularGuavaMapsWithSetterPrefix(battleaxes, vertices, rawMap); - } - @java.lang.Override - @java.lang.SuppressWarnings("all") - public java.lang.String toString() { - return "BuilderSingularGuavaMapsWithSetterPrefix.BuilderSingularGuavaMapsWithSetterPrefixBuilder(battleaxes=" + this.battleaxes + ", vertices=" + this.vertices + ", rawMap=" + this.rawMap + ")"; - } - } - @java.lang.SuppressWarnings("all") - public static BuilderSingularGuavaMapsWithSetterPrefixBuilder builder() { - return new BuilderSingularGuavaMapsWithSetterPrefixBuilder(); - } -} diff --git a/test/transform/resource/after-delombok/BuilderSingularLists.java b/test/transform/resource/after-delombok/BuilderSingularLists.java index a0be0c12..971a2851 100644 --- a/test/transform/resource/after-delombok/BuilderSingularLists.java +++ b/test/transform/resource/after-delombok/BuilderSingularLists.java @@ -23,53 +23,53 @@ class BuilderSingularLists { BuilderSingularListsBuilder() { } @java.lang.SuppressWarnings("all") - public BuilderSingularListsBuilder child(final T child) { + public BuilderSingularLists.BuilderSingularListsBuilder child(final T child) { if (this.children == null) this.children = new java.util.ArrayList(); this.children.add(child); return this; } @java.lang.SuppressWarnings("all") - public BuilderSingularListsBuilder children(final java.util.Collection children) { + public BuilderSingularLists.BuilderSingularListsBuilder children(final java.util.Collection children) { if (this.children == null) this.children = new java.util.ArrayList(); this.children.addAll(children); return this; } @java.lang.SuppressWarnings("all") - public BuilderSingularListsBuilder clearChildren() { + public BuilderSingularLists.BuilderSingularListsBuilder clearChildren() { if (this.children != null) this.children.clear(); return this; } @java.lang.SuppressWarnings("all") - public BuilderSingularListsBuilder scarf(final Number scarf) { + public BuilderSingularLists.BuilderSingularListsBuilder scarf(final Number scarf) { if (this.scarves == null) this.scarves = new java.util.ArrayList(); this.scarves.add(scarf); return this; } @java.lang.SuppressWarnings("all") - public BuilderSingularListsBuilder scarves(final java.util.Collection scarves) { + public BuilderSingularLists.BuilderSingularListsBuilder scarves(final java.util.Collection scarves) { if (this.scarves == null) this.scarves = new java.util.ArrayList(); this.scarves.addAll(scarves); return this; } @java.lang.SuppressWarnings("all") - public BuilderSingularListsBuilder clearScarves() { + public BuilderSingularLists.BuilderSingularListsBuilder clearScarves() { if (this.scarves != null) this.scarves.clear(); return this; } @java.lang.SuppressWarnings("all") - public BuilderSingularListsBuilder rawList(final java.lang.Object rawList) { + public BuilderSingularLists.BuilderSingularListsBuilder rawList(final java.lang.Object rawList) { if (this.rawList == null) this.rawList = new java.util.ArrayList(); this.rawList.add(rawList); return this; } @java.lang.SuppressWarnings("all") - public BuilderSingularListsBuilder rawList(final java.util.Collection rawList) { + public BuilderSingularLists.BuilderSingularListsBuilder rawList(final java.util.Collection rawList) { if (this.rawList == null) this.rawList = new java.util.ArrayList(); this.rawList.addAll(rawList); return this; } @java.lang.SuppressWarnings("all") - public BuilderSingularListsBuilder clearRawList() { + public BuilderSingularLists.BuilderSingularListsBuilder clearRawList() { if (this.rawList != null) this.rawList.clear(); return this; } @@ -117,7 +117,7 @@ class BuilderSingularLists { } } @java.lang.SuppressWarnings("all") - public static BuilderSingularListsBuilder builder() { - return new BuilderSingularListsBuilder(); + public static BuilderSingularLists.BuilderSingularListsBuilder builder() { + return new BuilderSingularLists.BuilderSingularListsBuilder(); } } diff --git a/test/transform/resource/after-delombok/BuilderSingularListsWithSetterPrefix.java b/test/transform/resource/after-delombok/BuilderSingularListsWithSetterPrefix.java deleted file mode 100644 index c685a352..00000000 --- a/test/transform/resource/after-delombok/BuilderSingularListsWithSetterPrefix.java +++ /dev/null @@ -1,123 +0,0 @@ -import java.util.List; -import java.util.Collection; -class BuilderSingularListsWithSetterPrefix { - private List children; - private Collection scarves; - @SuppressWarnings("all") - private List rawList; - @java.lang.SuppressWarnings("all") - BuilderSingularListsWithSetterPrefix(final List children, final Collection scarves, final List rawList) { - this.children = children; - this.scarves = scarves; - this.rawList = rawList; - } - @java.lang.SuppressWarnings("all") - public static class BuilderSingularListsWithSetterPrefixBuilder { - @java.lang.SuppressWarnings("all") - private java.util.ArrayList children; - @java.lang.SuppressWarnings("all") - private java.util.ArrayList scarves; - @java.lang.SuppressWarnings("all") - private java.util.ArrayList rawList; - @java.lang.SuppressWarnings("all") - BuilderSingularListsWithSetterPrefixBuilder() { - } - @java.lang.SuppressWarnings("all") - public BuilderSingularListsWithSetterPrefixBuilder withChild(final T child) { - if (this.children == null) this.children = new java.util.ArrayList(); - this.children.add(child); - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderSingularListsWithSetterPrefixBuilder withChildren(final java.util.Collection children) { - if (this.children == null) this.children = new java.util.ArrayList(); - this.children.addAll(children); - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderSingularListsWithSetterPrefixBuilder clearChildren() { - if (this.children != null) this.children.clear(); - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderSingularListsWithSetterPrefixBuilder withScarf(final Number scarf) { - if (this.scarves == null) this.scarves = new java.util.ArrayList(); - this.scarves.add(scarf); - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderSingularListsWithSetterPrefixBuilder withScarves(final java.util.Collection scarves) { - if (this.scarves == null) this.scarves = new java.util.ArrayList(); - this.scarves.addAll(scarves); - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderSingularListsWithSetterPrefixBuilder clearScarves() { - if (this.scarves != null) this.scarves.clear(); - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderSingularListsWithSetterPrefixBuilder withRawList(final java.lang.Object rawList) { - if (this.rawList == null) this.rawList = new java.util.ArrayList(); - this.rawList.add(rawList); - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderSingularListsWithSetterPrefixBuilder withRawList(final java.util.Collection rawList) { - if (this.rawList == null) this.rawList = new java.util.ArrayList(); - this.rawList.addAll(rawList); - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderSingularListsWithSetterPrefixBuilder clearRawList() { - if (this.rawList != null) this.rawList.clear(); - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderSingularListsWithSetterPrefix build() { - java.util.List children; - switch (this.children == null ? 0 : this.children.size()) { - case 0: - children = java.util.Collections.emptyList(); - break; - case 1: - children = java.util.Collections.singletonList(this.children.get(0)); - break; - default: - children = java.util.Collections.unmodifiableList(new java.util.ArrayList(this.children)); - } - java.util.Collection scarves; - switch (this.scarves == null ? 0 : this.scarves.size()) { - case 0: - scarves = java.util.Collections.emptyList(); - break; - case 1: - scarves = java.util.Collections.singletonList(this.scarves.get(0)); - break; - default: - scarves = java.util.Collections.unmodifiableList(new java.util.ArrayList(this.scarves)); - } - java.util.List rawList; - switch (this.rawList == null ? 0 : this.rawList.size()) { - case 0: - rawList = java.util.Collections.emptyList(); - break; - case 1: - rawList = java.util.Collections.singletonList(this.rawList.get(0)); - break; - default: - rawList = java.util.Collections.unmodifiableList(new java.util.ArrayList(this.rawList)); - } - return new BuilderSingularListsWithSetterPrefix(children, scarves, rawList); - } - @java.lang.Override - @java.lang.SuppressWarnings("all") - public java.lang.String toString() { - return "BuilderSingularListsWithSetterPrefix.BuilderSingularListsWithSetterPrefixBuilder(children=" + this.children + ", scarves=" + this.scarves + ", rawList=" + this.rawList + ")"; - } - } - @java.lang.SuppressWarnings("all") - public static BuilderSingularListsWithSetterPrefixBuilder builder() { - return new BuilderSingularListsWithSetterPrefixBuilder(); - } -} diff --git a/test/transform/resource/after-delombok/BuilderSingularMaps.java b/test/transform/resource/after-delombok/BuilderSingularMaps.java index 6520568b..240a6e3b 100644 --- a/test/transform/resource/after-delombok/BuilderSingularMaps.java +++ b/test/transform/resource/after-delombok/BuilderSingularMaps.java @@ -35,7 +35,7 @@ class BuilderSingularMaps { BuilderSingularMapsBuilder() { } @SuppressWarnings("all") - public BuilderSingularMapsBuilder woman(K womanKey, V womanValue) { + public BuilderSingularMaps.BuilderSingularMapsBuilder woman(K womanKey, V womanValue) { if (this.women$key == null) { this.women$key = new java.util.ArrayList(); this.women$value = new java.util.ArrayList(); @@ -45,7 +45,7 @@ class BuilderSingularMaps { return this; } @SuppressWarnings("all") - public BuilderSingularMapsBuilder women(java.util.Map women) { + public BuilderSingularMaps.BuilderSingularMapsBuilder women(java.util.Map women) { if (this.women$key == null) { this.women$key = new java.util.ArrayList(); this.women$value = new java.util.ArrayList(); @@ -57,7 +57,7 @@ class BuilderSingularMaps { return this; } @SuppressWarnings("all") - public BuilderSingularMapsBuilder clearWomen() { + public BuilderSingularMaps.BuilderSingularMapsBuilder clearWomen() { if (this.women$key != null) { this.women$key.clear(); this.women$value.clear(); @@ -65,7 +65,7 @@ class BuilderSingularMaps { return this; } @SuppressWarnings("all") - public BuilderSingularMapsBuilder man(K manKey, Number manValue) { + public BuilderSingularMaps.BuilderSingularMapsBuilder man(K manKey, Number manValue) { if (this.men$key == null) { this.men$key = new java.util.ArrayList(); this.men$value = new java.util.ArrayList(); @@ -75,7 +75,7 @@ class BuilderSingularMaps { return this; } @SuppressWarnings("all") - public BuilderSingularMapsBuilder men(java.util.Map men) { + public BuilderSingularMaps.BuilderSingularMapsBuilder men(java.util.Map men) { if (this.men$key == null) { this.men$key = new java.util.ArrayList(); this.men$value = new java.util.ArrayList(); @@ -87,7 +87,7 @@ class BuilderSingularMaps { return this; } @SuppressWarnings("all") - public BuilderSingularMapsBuilder clearMen() { + public BuilderSingularMaps.BuilderSingularMapsBuilder clearMen() { if (this.men$key != null) { this.men$key.clear(); this.men$value.clear(); @@ -95,7 +95,7 @@ class BuilderSingularMaps { return this; } @SuppressWarnings("all") - public BuilderSingularMapsBuilder rawMap(Object rawMapKey, Object rawMapValue) { + public BuilderSingularMaps.BuilderSingularMapsBuilder rawMap(Object rawMapKey, Object rawMapValue) { if (this.rawMap$key == null) { this.rawMap$key = new java.util.ArrayList(); this.rawMap$value = new java.util.ArrayList(); @@ -105,7 +105,7 @@ class BuilderSingularMaps { return this; } @SuppressWarnings("all") - public BuilderSingularMapsBuilder rawMap(java.util.Map rawMap) { + public BuilderSingularMaps.BuilderSingularMapsBuilder rawMap(java.util.Map rawMap) { if (this.rawMap$key == null) { this.rawMap$key = new java.util.ArrayList(); this.rawMap$value = new java.util.ArrayList(); @@ -117,7 +117,7 @@ class BuilderSingularMaps { return this; } @SuppressWarnings("all") - public BuilderSingularMapsBuilder clearRawMap() { + public BuilderSingularMaps.BuilderSingularMapsBuilder clearRawMap() { if (this.rawMap$key != null) { this.rawMap$key.clear(); this.rawMap$value.clear(); @@ -125,7 +125,7 @@ class BuilderSingularMaps { return this; } @SuppressWarnings("all") - public BuilderSingularMapsBuilder stringMap(String stringMapKey, V stringMapValue) { + public BuilderSingularMaps.BuilderSingularMapsBuilder stringMap(String stringMapKey, V stringMapValue) { if (this.stringMap$key == null) { this.stringMap$key = new java.util.ArrayList(); this.stringMap$value = new java.util.ArrayList(); @@ -135,7 +135,7 @@ class BuilderSingularMaps { return this; } @SuppressWarnings("all") - public BuilderSingularMapsBuilder stringMap(java.util.Map stringMap) { + public BuilderSingularMaps.BuilderSingularMapsBuilder stringMap(java.util.Map stringMap) { if (this.stringMap$key == null) { this.stringMap$key = new java.util.ArrayList(); this.stringMap$value = new java.util.ArrayList(); @@ -147,7 +147,7 @@ class BuilderSingularMaps { return this; } @SuppressWarnings("all") - public BuilderSingularMapsBuilder clearStringMap() { + public BuilderSingularMaps.BuilderSingularMapsBuilder clearStringMap() { if (this.stringMap$key != null) { this.stringMap$key.clear(); this.stringMap$value.clear(); @@ -207,7 +207,7 @@ class BuilderSingularMaps { } } @SuppressWarnings("all") - public static BuilderSingularMapsBuilder builder() { - return new BuilderSingularMapsBuilder(); + public static BuilderSingularMaps.BuilderSingularMapsBuilder builder() { + return new BuilderSingularMaps.BuilderSingularMapsBuilder(); } } diff --git a/test/transform/resource/after-delombok/BuilderSingularMapsWithSetterPrefix.java b/test/transform/resource/after-delombok/BuilderSingularMapsWithSetterPrefix.java index a4afb8a8..bfc2e750 100644 --- a/test/transform/resource/after-delombok/BuilderSingularMapsWithSetterPrefix.java +++ b/test/transform/resource/after-delombok/BuilderSingularMapsWithSetterPrefix.java @@ -35,7 +35,7 @@ class BuilderSingularMapsWithSetterPrefix { BuilderSingularMapsWithSetterPrefixBuilder() { } @SuppressWarnings("all") - public BuilderSingularMapsWithSetterPrefixBuilder withWoman(K womanKey, V womanValue) { + public BuilderSingularMapsWithSetterPrefix.BuilderSingularMapsWithSetterPrefixBuilder withWoman(K womanKey, V womanValue) { if (this.women$key == null) { this.women$key = new java.util.ArrayList(); this.women$value = new java.util.ArrayList(); @@ -45,7 +45,7 @@ class BuilderSingularMapsWithSetterPrefix { return this; } @SuppressWarnings("all") - public BuilderSingularMapsWithSetterPrefixBuilder withWomen(java.util.Map women) { + public BuilderSingularMapsWithSetterPrefix.BuilderSingularMapsWithSetterPrefixBuilder withWomen(java.util.Map women) { if (this.women$key == null) { this.women$key = new java.util.ArrayList(); this.women$value = new java.util.ArrayList(); @@ -57,7 +57,7 @@ class BuilderSingularMapsWithSetterPrefix { return this; } @SuppressWarnings("all") - public BuilderSingularMapsWithSetterPrefixBuilder clearWomen() { + public BuilderSingularMapsWithSetterPrefix.BuilderSingularMapsWithSetterPrefixBuilder clearWomen() { if (this.women$key != null) { this.women$key.clear(); this.women$value.clear(); @@ -65,7 +65,7 @@ class BuilderSingularMapsWithSetterPrefix { return this; } @SuppressWarnings("all") - public BuilderSingularMapsWithSetterPrefixBuilder withMan(K manKey, Number manValue) { + public BuilderSingularMapsWithSetterPrefix.BuilderSingularMapsWithSetterPrefixBuilder withMan(K manKey, Number manValue) { if (this.men$key == null) { this.men$key = new java.util.ArrayList(); this.men$value = new java.util.ArrayList(); @@ -75,7 +75,7 @@ class BuilderSingularMapsWithSetterPrefix { return this; } @SuppressWarnings("all") - public BuilderSingularMapsWithSetterPrefixBuilder withMen(java.util.Map men) { + public BuilderSingularMapsWithSetterPrefix.BuilderSingularMapsWithSetterPrefixBuilder withMen(java.util.Map men) { if (this.men$key == null) { this.men$key = new java.util.ArrayList(); this.men$value = new java.util.ArrayList(); @@ -87,7 +87,7 @@ class BuilderSingularMapsWithSetterPrefix { return this; } @SuppressWarnings("all") - public BuilderSingularMapsWithSetterPrefixBuilder clearMen() { + public BuilderSingularMapsWithSetterPrefix.BuilderSingularMapsWithSetterPrefixBuilder clearMen() { if (this.men$key != null) { this.men$key.clear(); this.men$value.clear(); @@ -95,7 +95,7 @@ class BuilderSingularMapsWithSetterPrefix { return this; } @SuppressWarnings("all") - public BuilderSingularMapsWithSetterPrefixBuilder withRawMap(Object rawMapKey, Object rawMapValue) { + public BuilderSingularMapsWithSetterPrefix.BuilderSingularMapsWithSetterPrefixBuilder withRawMap(Object rawMapKey, Object rawMapValue) { if (this.rawMap$key == null) { this.rawMap$key = new java.util.ArrayList(); this.rawMap$value = new java.util.ArrayList(); @@ -105,7 +105,7 @@ class BuilderSingularMapsWithSetterPrefix { return this; } @SuppressWarnings("all") - public BuilderSingularMapsWithSetterPrefixBuilder withRawMap(java.util.Map rawMap) { + public BuilderSingularMapsWithSetterPrefix.BuilderSingularMapsWithSetterPrefixBuilder withRawMap(java.util.Map rawMap) { if (this.rawMap$key == null) { this.rawMap$key = new java.util.ArrayList(); this.rawMap$value = new java.util.ArrayList(); @@ -117,7 +117,7 @@ class BuilderSingularMapsWithSetterPrefix { return this; } @SuppressWarnings("all") - public BuilderSingularMapsWithSetterPrefixBuilder clearRawMap() { + public BuilderSingularMapsWithSetterPrefix.BuilderSingularMapsWithSetterPrefixBuilder clearRawMap() { if (this.rawMap$key != null) { this.rawMap$key.clear(); this.rawMap$value.clear(); @@ -125,7 +125,7 @@ class BuilderSingularMapsWithSetterPrefix { return this; } @SuppressWarnings("all") - public BuilderSingularMapsWithSetterPrefixBuilder withStringMap(String stringMapKey, V stringMapValue) { + public BuilderSingularMapsWithSetterPrefix.BuilderSingularMapsWithSetterPrefixBuilder withStringMap(String stringMapKey, V stringMapValue) { if (this.stringMap$key == null) { this.stringMap$key = new java.util.ArrayList(); this.stringMap$value = new java.util.ArrayList(); @@ -135,7 +135,7 @@ class BuilderSingularMapsWithSetterPrefix { return this; } @SuppressWarnings("all") - public BuilderSingularMapsWithSetterPrefixBuilder withStringMap(java.util.Map stringMap) { + public BuilderSingularMapsWithSetterPrefix.BuilderSingularMapsWithSetterPrefixBuilder withStringMap(java.util.Map stringMap) { if (this.stringMap$key == null) { this.stringMap$key = new java.util.ArrayList(); this.stringMap$value = new java.util.ArrayList(); @@ -147,7 +147,7 @@ class BuilderSingularMapsWithSetterPrefix { return this; } @SuppressWarnings("all") - public BuilderSingularMapsWithSetterPrefixBuilder clearStringMap() { + public BuilderSingularMapsWithSetterPrefix.BuilderSingularMapsWithSetterPrefixBuilder clearStringMap() { if (this.stringMap$key != null) { this.stringMap$key.clear(); this.stringMap$value.clear(); @@ -207,7 +207,7 @@ class BuilderSingularMapsWithSetterPrefix { } } @SuppressWarnings("all") - public static BuilderSingularMapsWithSetterPrefixBuilder builder() { - return new BuilderSingularMapsWithSetterPrefixBuilder(); + public static BuilderSingularMapsWithSetterPrefix.BuilderSingularMapsWithSetterPrefixBuilder builder() { + return new BuilderSingularMapsWithSetterPrefix.BuilderSingularMapsWithSetterPrefixBuilder(); } } diff --git a/test/transform/resource/after-delombok/BuilderSingularNoAuto.java b/test/transform/resource/after-delombok/BuilderSingularNoAuto.java index 189408da..a38effc0 100644 --- a/test/transform/resource/after-delombok/BuilderSingularNoAuto.java +++ b/test/transform/resource/after-delombok/BuilderSingularNoAuto.java @@ -21,53 +21,53 @@ class BuilderSingularNoAuto { BuilderSingularNoAutoBuilder() { } @java.lang.SuppressWarnings("all") - public BuilderSingularNoAutoBuilder things(final String things) { + public BuilderSingularNoAuto.BuilderSingularNoAutoBuilder things(final String things) { if (this.things == null) this.things = new java.util.ArrayList(); this.things.add(things); return this; } @java.lang.SuppressWarnings("all") - public BuilderSingularNoAutoBuilder things(final java.util.Collection things) { + public BuilderSingularNoAuto.BuilderSingularNoAutoBuilder things(final java.util.Collection things) { if (this.things == null) this.things = new java.util.ArrayList(); this.things.addAll(things); return this; } @java.lang.SuppressWarnings("all") - public BuilderSingularNoAutoBuilder clearThings() { + public BuilderSingularNoAuto.BuilderSingularNoAutoBuilder clearThings() { if (this.things != null) this.things.clear(); return this; } @java.lang.SuppressWarnings("all") - public BuilderSingularNoAutoBuilder widget(final String widget) { + public BuilderSingularNoAuto.BuilderSingularNoAutoBuilder widget(final String widget) { if (this.widgets == null) this.widgets = new java.util.ArrayList(); this.widgets.add(widget); return this; } @java.lang.SuppressWarnings("all") - public BuilderSingularNoAutoBuilder widgets(final java.util.Collection widgets) { + public BuilderSingularNoAuto.BuilderSingularNoAutoBuilder widgets(final java.util.Collection widgets) { if (this.widgets == null) this.widgets = new java.util.ArrayList(); this.widgets.addAll(widgets); return this; } @java.lang.SuppressWarnings("all") - public BuilderSingularNoAutoBuilder clearWidgets() { + public BuilderSingularNoAuto.BuilderSingularNoAutoBuilder clearWidgets() { if (this.widgets != null) this.widgets.clear(); return this; } @java.lang.SuppressWarnings("all") - public BuilderSingularNoAutoBuilder items(final String items) { + public BuilderSingularNoAuto.BuilderSingularNoAutoBuilder items(final String items) { if (this.items == null) this.items = new java.util.ArrayList(); this.items.add(items); return this; } @java.lang.SuppressWarnings("all") - public BuilderSingularNoAutoBuilder items(final java.util.Collection items) { + public BuilderSingularNoAuto.BuilderSingularNoAutoBuilder items(final java.util.Collection items) { if (this.items == null) this.items = new java.util.ArrayList(); this.items.addAll(items); return this; } @java.lang.SuppressWarnings("all") - public BuilderSingularNoAutoBuilder clearItems() { + public BuilderSingularNoAuto.BuilderSingularNoAutoBuilder clearItems() { if (this.items != null) this.items.clear(); return this; } @@ -115,7 +115,7 @@ class BuilderSingularNoAuto { } } @java.lang.SuppressWarnings("all") - public static BuilderSingularNoAutoBuilder builder() { - return new BuilderSingularNoAutoBuilder(); + public static BuilderSingularNoAuto.BuilderSingularNoAutoBuilder builder() { + return new BuilderSingularNoAuto.BuilderSingularNoAutoBuilder(); } } diff --git a/test/transform/resource/after-delombok/BuilderSingularNoAutoWithSetterPrefix.java b/test/transform/resource/after-delombok/BuilderSingularNoAutoWithSetterPrefix.java index d2b5ff37..57bef625 100644 --- a/test/transform/resource/after-delombok/BuilderSingularNoAutoWithSetterPrefix.java +++ b/test/transform/resource/after-delombok/BuilderSingularNoAutoWithSetterPrefix.java @@ -21,53 +21,53 @@ class BuilderSingularNoAutoWithSetterPrefix { BuilderSingularNoAutoWithSetterPrefixBuilder() { } @java.lang.SuppressWarnings("all") - public BuilderSingularNoAutoWithSetterPrefixBuilder withThings(final String things) { + public BuilderSingularNoAutoWithSetterPrefix.BuilderSingularNoAutoWithSetterPrefixBuilder withThings(final String things) { if (this.things == null) this.things = new java.util.ArrayList(); this.things.add(things); return this; } @java.lang.SuppressWarnings("all") - public BuilderSingularNoAutoWithSetterPrefixBuilder withThings(final java.util.Collection things) { + public BuilderSingularNoAutoWithSetterPrefix.BuilderSingularNoAutoWithSetterPrefixBuilder withThings(final java.util.Collection things) { if (this.things == null) this.things = new java.util.ArrayList(); this.things.addAll(things); return this; } @java.lang.SuppressWarnings("all") - public BuilderSingularNoAutoWithSetterPrefixBuilder clearThings() { + public BuilderSingularNoAutoWithSetterPrefix.BuilderSingularNoAutoWithSetterPrefixBuilder clearThings() { if (this.things != null) this.things.clear(); return this; } @java.lang.SuppressWarnings("all") - public BuilderSingularNoAutoWithSetterPrefixBuilder withWidget(final String widget) { + public BuilderSingularNoAutoWithSetterPrefix.BuilderSingularNoAutoWithSetterPrefixBuilder withWidget(final String widget) { if (this.widgets == null) this.widgets = new java.util.ArrayList(); this.widgets.add(widget); return this; } @java.lang.SuppressWarnings("all") - public BuilderSingularNoAutoWithSetterPrefixBuilder withWidgets(final java.util.Collection widgets) { + public BuilderSingularNoAutoWithSetterPrefix.BuilderSingularNoAutoWithSetterPrefixBuilder withWidgets(final java.util.Collection widgets) { if (this.widgets == null) this.widgets = new java.util.ArrayList(); this.widgets.addAll(widgets); return this; } @java.lang.SuppressWarnings("all") - public BuilderSingularNoAutoWithSetterPrefixBuilder clearWidgets() { + public BuilderSingularNoAutoWithSetterPrefix.BuilderSingularNoAutoWithSetterPrefixBuilder clearWidgets() { if (this.widgets != null) this.widgets.clear(); return this; } @java.lang.SuppressWarnings("all") - public BuilderSingularNoAutoWithSetterPrefixBuilder withItems(final String items) { + public BuilderSingularNoAutoWithSetterPrefix.BuilderSingularNoAutoWithSetterPrefixBuilder withItems(final String items) { if (this.items == null) this.items = new java.util.ArrayList(); this.items.add(items); return this; } @java.lang.SuppressWarnings("all") - public BuilderSingularNoAutoWithSetterPrefixBuilder withItems(final java.util.Collection items) { + public BuilderSingularNoAutoWithSetterPrefix.BuilderSingularNoAutoWithSetterPrefixBuilder withItems(final java.util.Collection items) { if (this.items == null) this.items = new java.util.ArrayList(); this.items.addAll(items); return this; } @java.lang.SuppressWarnings("all") - public BuilderSingularNoAutoWithSetterPrefixBuilder clearItems() { + public BuilderSingularNoAutoWithSetterPrefix.BuilderSingularNoAutoWithSetterPrefixBuilder clearItems() { if (this.items != null) this.items.clear(); return this; } @@ -115,7 +115,7 @@ class BuilderSingularNoAutoWithSetterPrefix { } } @java.lang.SuppressWarnings("all") - public static BuilderSingularNoAutoWithSetterPrefixBuilder builder() { - return new BuilderSingularNoAutoWithSetterPrefixBuilder(); + public static BuilderSingularNoAutoWithSetterPrefix.BuilderSingularNoAutoWithSetterPrefixBuilder builder() { + return new BuilderSingularNoAutoWithSetterPrefix.BuilderSingularNoAutoWithSetterPrefixBuilder(); } } diff --git a/test/transform/resource/after-delombok/BuilderSingularRedirectToGuava.java b/test/transform/resource/after-delombok/BuilderSingularRedirectToGuava.java index 938f3bbc..4ce5cae5 100644 --- a/test/transform/resource/after-delombok/BuilderSingularRedirectToGuava.java +++ b/test/transform/resource/after-delombok/BuilderSingularRedirectToGuava.java @@ -23,53 +23,53 @@ class BuilderSingularRedirectToGuava { BuilderSingularRedirectToGuavaBuilder() { } @java.lang.SuppressWarnings("all") - public BuilderSingularRedirectToGuavaBuilder dangerMouse(final String dangerMouse) { + public BuilderSingularRedirectToGuava.BuilderSingularRedirectToGuavaBuilder dangerMouse(final String dangerMouse) { if (this.dangerMice == null) this.dangerMice = com.google.common.collect.ImmutableSet.builder(); this.dangerMice.add(dangerMouse); return this; } @java.lang.SuppressWarnings("all") - public BuilderSingularRedirectToGuavaBuilder dangerMice(final java.lang.Iterable dangerMice) { + public BuilderSingularRedirectToGuava.BuilderSingularRedirectToGuavaBuilder dangerMice(final java.lang.Iterable dangerMice) { if (this.dangerMice == null) this.dangerMice = com.google.common.collect.ImmutableSet.builder(); this.dangerMice.addAll(dangerMice); return this; } @java.lang.SuppressWarnings("all") - public BuilderSingularRedirectToGuavaBuilder clearDangerMice() { + public BuilderSingularRedirectToGuava.BuilderSingularRedirectToGuavaBuilder clearDangerMice() { this.dangerMice = null; return this; } @java.lang.SuppressWarnings("all") - public BuilderSingularRedirectToGuavaBuilder thing(final Integer key, final Number value) { + public BuilderSingularRedirectToGuava.BuilderSingularRedirectToGuavaBuilder thing(final Integer key, final Number value) { if (this.things == null) this.things = com.google.common.collect.ImmutableSortedMap.naturalOrder(); this.things.put(key, value); return this; } @java.lang.SuppressWarnings("all") - public BuilderSingularRedirectToGuavaBuilder things(final java.util.Map things) { + public BuilderSingularRedirectToGuava.BuilderSingularRedirectToGuavaBuilder things(final java.util.Map things) { if (this.things == null) this.things = com.google.common.collect.ImmutableSortedMap.naturalOrder(); this.things.putAll(things); return this; } @java.lang.SuppressWarnings("all") - public BuilderSingularRedirectToGuavaBuilder clearThings() { + public BuilderSingularRedirectToGuava.BuilderSingularRedirectToGuavaBuilder clearThings() { this.things = null; return this; } @java.lang.SuppressWarnings("all") - public BuilderSingularRedirectToGuavaBuilder doohickey(final Class doohickey) { + public BuilderSingularRedirectToGuava.BuilderSingularRedirectToGuavaBuilder doohickey(final Class doohickey) { if (this.doohickeys == null) this.doohickeys = com.google.common.collect.ImmutableList.builder(); this.doohickeys.add(doohickey); return this; } @java.lang.SuppressWarnings("all") - public BuilderSingularRedirectToGuavaBuilder doohickeys(final java.lang.Iterable> doohickeys) { + public BuilderSingularRedirectToGuava.BuilderSingularRedirectToGuavaBuilder doohickeys(final java.lang.Iterable> doohickeys) { if (this.doohickeys == null) this.doohickeys = com.google.common.collect.ImmutableList.builder(); this.doohickeys.addAll(doohickeys); return this; } @java.lang.SuppressWarnings("all") - public BuilderSingularRedirectToGuavaBuilder clearDoohickeys() { + public BuilderSingularRedirectToGuava.BuilderSingularRedirectToGuavaBuilder clearDoohickeys() { this.doohickeys = null; return this; } @@ -87,7 +87,7 @@ class BuilderSingularRedirectToGuava { } } @java.lang.SuppressWarnings("all") - public static BuilderSingularRedirectToGuavaBuilder builder() { - return new BuilderSingularRedirectToGuavaBuilder(); + public static BuilderSingularRedirectToGuava.BuilderSingularRedirectToGuavaBuilder builder() { + return new BuilderSingularRedirectToGuava.BuilderSingularRedirectToGuavaBuilder(); } } diff --git a/test/transform/resource/after-delombok/BuilderSingularRedirectToGuavaWithSetterPrefix.java b/test/transform/resource/after-delombok/BuilderSingularRedirectToGuavaWithSetterPrefix.java deleted file mode 100644 index b0fe8135..00000000 --- a/test/transform/resource/after-delombok/BuilderSingularRedirectToGuavaWithSetterPrefix.java +++ /dev/null @@ -1,93 +0,0 @@ -import java.util.Set; -import java.util.NavigableMap; -import java.util.Collection; -class BuilderSingularRedirectToGuavaWithSetterPrefix { - private Set dangerMice; - private NavigableMap things; - private Collection> doohickeys; - @java.lang.SuppressWarnings("all") - BuilderSingularRedirectToGuavaWithSetterPrefix(final Set dangerMice, final NavigableMap things, final Collection> doohickeys) { - this.dangerMice = dangerMice; - this.things = things; - this.doohickeys = doohickeys; - } - @java.lang.SuppressWarnings("all") - public static class BuilderSingularRedirectToGuavaWithSetterPrefixBuilder { - @java.lang.SuppressWarnings("all") - private com.google.common.collect.ImmutableSet.Builder dangerMice; - @java.lang.SuppressWarnings("all") - private com.google.common.collect.ImmutableSortedMap.Builder things; - @java.lang.SuppressWarnings("all") - private com.google.common.collect.ImmutableList.Builder> doohickeys; - @java.lang.SuppressWarnings("all") - BuilderSingularRedirectToGuavaWithSetterPrefixBuilder() { - } - @java.lang.SuppressWarnings("all") - public BuilderSingularRedirectToGuavaWithSetterPrefixBuilder withDangerMouse(final String dangerMouse) { - if (this.dangerMice == null) this.dangerMice = com.google.common.collect.ImmutableSet.builder(); - this.dangerMice.add(dangerMouse); - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderSingularRedirectToGuavaWithSetterPrefixBuilder withDangerMice(final java.lang.Iterable dangerMice) { - if (this.dangerMice == null) this.dangerMice = com.google.common.collect.ImmutableSet.builder(); - this.dangerMice.addAll(dangerMice); - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderSingularRedirectToGuavaWithSetterPrefixBuilder clearDangerMice() { - this.dangerMice = null; - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderSingularRedirectToGuavaWithSetterPrefixBuilder withThing(final Integer key, final Number value) { - if (this.things == null) this.things = com.google.common.collect.ImmutableSortedMap.naturalOrder(); - this.things.put(key, value); - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderSingularRedirectToGuavaWithSetterPrefixBuilder withThings(final java.util.Map things) { - if (this.things == null) this.things = com.google.common.collect.ImmutableSortedMap.naturalOrder(); - this.things.putAll(things); - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderSingularRedirectToGuavaWithSetterPrefixBuilder clearThings() { - this.things = null; - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderSingularRedirectToGuavaWithSetterPrefixBuilder withDoohickey(final Class doohickey) { - if (this.doohickeys == null) this.doohickeys = com.google.common.collect.ImmutableList.builder(); - this.doohickeys.add(doohickey); - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderSingularRedirectToGuavaWithSetterPrefixBuilder withDoohickeys(final java.lang.Iterable> doohickeys) { - if (this.doohickeys == null) this.doohickeys = com.google.common.collect.ImmutableList.builder(); - this.doohickeys.addAll(doohickeys); - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderSingularRedirectToGuavaWithSetterPrefixBuilder clearDoohickeys() { - this.doohickeys = null; - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderSingularRedirectToGuavaWithSetterPrefix build() { - java.util.Set dangerMice = this.dangerMice == null ? com.google.common.collect.ImmutableSet.of() : this.dangerMice.build(); - java.util.NavigableMap things = this.things == null ? com.google.common.collect.ImmutableSortedMap.of() : this.things.build(); - java.util.Collection> doohickeys = this.doohickeys == null ? com.google.common.collect.ImmutableList.>of() : this.doohickeys.build(); - return new BuilderSingularRedirectToGuavaWithSetterPrefix(dangerMice, things, doohickeys); - } - @java.lang.Override - @java.lang.SuppressWarnings("all") - public java.lang.String toString() { - return "BuilderSingularRedirectToGuavaWithSetterPrefix.BuilderSingularRedirectToGuavaWithSetterPrefixBuilder(dangerMice=" + this.dangerMice + ", things=" + this.things + ", doohickeys=" + this.doohickeys + ")"; - } - } - @java.lang.SuppressWarnings("all") - public static BuilderSingularRedirectToGuavaWithSetterPrefixBuilder builder() { - return new BuilderSingularRedirectToGuavaWithSetterPrefixBuilder(); - } -} diff --git a/test/transform/resource/after-delombok/BuilderSingularSets.java b/test/transform/resource/after-delombok/BuilderSingularSets.java index 2d75b294..c85bbb99 100644 --- a/test/transform/resource/after-delombok/BuilderSingularSets.java +++ b/test/transform/resource/after-delombok/BuilderSingularSets.java @@ -27,70 +27,70 @@ class BuilderSingularSets { BuilderSingularSetsBuilder() { } @java.lang.SuppressWarnings("all") - public BuilderSingularSetsBuilder dangerMouse(final T dangerMouse) { + public BuilderSingularSets.BuilderSingularSetsBuilder dangerMouse(final T dangerMouse) { if (this.dangerMice == null) this.dangerMice = new java.util.ArrayList(); this.dangerMice.add(dangerMouse); return this; } @java.lang.SuppressWarnings("all") - public BuilderSingularSetsBuilder dangerMice(final java.util.Collection dangerMice) { + public BuilderSingularSets.BuilderSingularSetsBuilder dangerMice(final java.util.Collection dangerMice) { if (this.dangerMice == null) this.dangerMice = new java.util.ArrayList(); this.dangerMice.addAll(dangerMice); return this; } @java.lang.SuppressWarnings("all") - public BuilderSingularSetsBuilder clearDangerMice() { + public BuilderSingularSets.BuilderSingularSetsBuilder clearDangerMice() { if (this.dangerMice != null) this.dangerMice.clear(); return this; } @java.lang.SuppressWarnings("all") - public BuilderSingularSetsBuilder octopus(final Number octopus) { + public BuilderSingularSets.BuilderSingularSetsBuilder octopus(final Number octopus) { if (this.octopodes == null) this.octopodes = new java.util.ArrayList(); this.octopodes.add(octopus); return this; } @java.lang.SuppressWarnings("all") - public BuilderSingularSetsBuilder octopodes(final java.util.Collection octopodes) { + public BuilderSingularSets.BuilderSingularSetsBuilder octopodes(final java.util.Collection octopodes) { if (this.octopodes == null) this.octopodes = new java.util.ArrayList(); this.octopodes.addAll(octopodes); return this; } @java.lang.SuppressWarnings("all") - public BuilderSingularSetsBuilder clearOctopodes() { + public BuilderSingularSets.BuilderSingularSetsBuilder clearOctopodes() { if (this.octopodes != null) this.octopodes.clear(); return this; } @java.lang.SuppressWarnings("all") - public BuilderSingularSetsBuilder rawSet(final java.lang.Object rawSet) { + public BuilderSingularSets.BuilderSingularSetsBuilder rawSet(final java.lang.Object rawSet) { if (this.rawSet == null) this.rawSet = new java.util.ArrayList(); this.rawSet.add(rawSet); return this; } @java.lang.SuppressWarnings("all") - public BuilderSingularSetsBuilder rawSet(final java.util.Collection rawSet) { + public BuilderSingularSets.BuilderSingularSetsBuilder rawSet(final java.util.Collection rawSet) { if (this.rawSet == null) this.rawSet = new java.util.ArrayList(); this.rawSet.addAll(rawSet); return this; } @java.lang.SuppressWarnings("all") - public BuilderSingularSetsBuilder clearRawSet() { + public BuilderSingularSets.BuilderSingularSetsBuilder clearRawSet() { if (this.rawSet != null) this.rawSet.clear(); return this; } @java.lang.SuppressWarnings("all") - public BuilderSingularSetsBuilder stringSet(final String stringSet) { + public BuilderSingularSets.BuilderSingularSetsBuilder stringSet(final String stringSet) { if (this.stringSet == null) this.stringSet = new java.util.ArrayList(); this.stringSet.add(stringSet); return this; } @java.lang.SuppressWarnings("all") - public BuilderSingularSetsBuilder stringSet(final java.util.Collection stringSet) { + public BuilderSingularSets.BuilderSingularSetsBuilder stringSet(final java.util.Collection stringSet) { if (this.stringSet == null) this.stringSet = new java.util.ArrayList(); this.stringSet.addAll(stringSet); return this; } @java.lang.SuppressWarnings("all") - public BuilderSingularSetsBuilder clearStringSet() { + public BuilderSingularSets.BuilderSingularSetsBuilder clearStringSet() { if (this.stringSet != null) this.stringSet.clear(); return this; } @@ -147,7 +147,7 @@ class BuilderSingularSets { } } @java.lang.SuppressWarnings("all") - public static BuilderSingularSetsBuilder builder() { - return new BuilderSingularSetsBuilder(); + public static BuilderSingularSets.BuilderSingularSetsBuilder builder() { + return new BuilderSingularSets.BuilderSingularSetsBuilder(); } } diff --git a/test/transform/resource/after-delombok/BuilderSingularSetsWithSetterPrefix.java b/test/transform/resource/after-delombok/BuilderSingularSetsWithSetterPrefix.java index 9702b850..6c9abf2f 100644 --- a/test/transform/resource/after-delombok/BuilderSingularSetsWithSetterPrefix.java +++ b/test/transform/resource/after-delombok/BuilderSingularSetsWithSetterPrefix.java @@ -27,70 +27,70 @@ class BuilderSingularSetsWithSetterPrefix { BuilderSingularSetsWithSetterPrefixBuilder() { } @java.lang.SuppressWarnings("all") - public BuilderSingularSetsWithSetterPrefixBuilder withDangerMouse(final T dangerMouse) { + public BuilderSingularSetsWithSetterPrefix.BuilderSingularSetsWithSetterPrefixBuilder withDangerMouse(final T dangerMouse) { if (this.dangerMice == null) this.dangerMice = new java.util.ArrayList(); this.dangerMice.add(dangerMouse); return this; } @java.lang.SuppressWarnings("all") - public BuilderSingularSetsWithSetterPrefixBuilder withDangerMice(final java.util.Collection dangerMice) { + public BuilderSingularSetsWithSetterPrefix.BuilderSingularSetsWithSetterPrefixBuilder withDangerMice(final java.util.Collection dangerMice) { if (this.dangerMice == null) this.dangerMice = new java.util.ArrayList(); this.dangerMice.addAll(dangerMice); return this; } @java.lang.SuppressWarnings("all") - public BuilderSingularSetsWithSetterPrefixBuilder clearDangerMice() { + public BuilderSingularSetsWithSetterPrefix.BuilderSingularSetsWithSetterPrefixBuilder clearDangerMice() { if (this.dangerMice != null) this.dangerMice.clear(); return this; } @java.lang.SuppressWarnings("all") - public BuilderSingularSetsWithSetterPrefixBuilder withOctopus(final Number octopus) { + public BuilderSingularSetsWithSetterPrefix.BuilderSingularSetsWithSetterPrefixBuilder withOctopus(final Number octopus) { if (this.octopodes == null) this.octopodes = new java.util.ArrayList(); this.octopodes.add(octopus); return this; } @java.lang.SuppressWarnings("all") - public BuilderSingularSetsWithSetterPrefixBuilder withOctopodes(final java.util.Collection octopodes) { + public BuilderSingularSetsWithSetterPrefix.BuilderSingularSetsWithSetterPrefixBuilder withOctopodes(final java.util.Collection octopodes) { if (this.octopodes == null) this.octopodes = new java.util.ArrayList(); this.octopodes.addAll(octopodes); return this; } @java.lang.SuppressWarnings("all") - public BuilderSingularSetsWithSetterPrefixBuilder clearOctopodes() { + public BuilderSingularSetsWithSetterPrefix.BuilderSingularSetsWithSetterPrefixBuilder clearOctopodes() { if (this.octopodes != null) this.octopodes.clear(); return this; } @java.lang.SuppressWarnings("all") - public BuilderSingularSetsWithSetterPrefixBuilder withRawSet(final java.lang.Object rawSet) { + public BuilderSingularSetsWithSetterPrefix.BuilderSingularSetsWithSetterPrefixBuilder withRawSet(final java.lang.Object rawSet) { if (this.rawSet == null) this.rawSet = new java.util.ArrayList(); this.rawSet.add(rawSet); return this; } @java.lang.SuppressWarnings("all") - public BuilderSingularSetsWithSetterPrefixBuilder withRawSet(final java.util.Collection rawSet) { + public BuilderSingularSetsWithSetterPrefix.BuilderSingularSetsWithSetterPrefixBuilder withRawSet(final java.util.Collection rawSet) { if (this.rawSet == null) this.rawSet = new java.util.ArrayList(); this.rawSet.addAll(rawSet); return this; } @java.lang.SuppressWarnings("all") - public BuilderSingularSetsWithSetterPrefixBuilder clearRawSet() { + public BuilderSingularSetsWithSetterPrefix.BuilderSingularSetsWithSetterPrefixBuilder clearRawSet() { if (this.rawSet != null) this.rawSet.clear(); return this; } @java.lang.SuppressWarnings("all") - public BuilderSingularSetsWithSetterPrefixBuilder withStringSet(final String stringSet) { + public BuilderSingularSetsWithSetterPrefix.BuilderSingularSetsWithSetterPrefixBuilder withStringSet(final String stringSet) { if (this.stringSet == null) this.stringSet = new java.util.ArrayList(); this.stringSet.add(stringSet); return this; } @java.lang.SuppressWarnings("all") - public BuilderSingularSetsWithSetterPrefixBuilder withStringSet(final java.util.Collection stringSet) { + public BuilderSingularSetsWithSetterPrefix.BuilderSingularSetsWithSetterPrefixBuilder withStringSet(final java.util.Collection stringSet) { if (this.stringSet == null) this.stringSet = new java.util.ArrayList(); this.stringSet.addAll(stringSet); return this; } @java.lang.SuppressWarnings("all") - public BuilderSingularSetsWithSetterPrefixBuilder clearStringSet() { + public BuilderSingularSetsWithSetterPrefix.BuilderSingularSetsWithSetterPrefixBuilder clearStringSet() { if (this.stringSet != null) this.stringSet.clear(); return this; } @@ -147,7 +147,7 @@ class BuilderSingularSetsWithSetterPrefix { } } @java.lang.SuppressWarnings("all") - public static BuilderSingularSetsWithSetterPrefixBuilder builder() { - return new BuilderSingularSetsWithSetterPrefixBuilder(); + public static BuilderSingularSetsWithSetterPrefix.BuilderSingularSetsWithSetterPrefixBuilder builder() { + return new BuilderSingularSetsWithSetterPrefix.BuilderSingularSetsWithSetterPrefixBuilder(); } } diff --git a/test/transform/resource/after-delombok/BuilderSingularToBuilderWithNull.java b/test/transform/resource/after-delombok/BuilderSingularToBuilderWithNull.java index 96ffd2dc..2166491b 100644 --- a/test/transform/resource/after-delombok/BuilderSingularToBuilderWithNull.java +++ b/test/transform/resource/after-delombok/BuilderSingularToBuilderWithNull.java @@ -15,19 +15,19 @@ class BuilderSingularToBuilderWithNull { BuilderSingularToBuilderWithNullBuilder() { } @java.lang.SuppressWarnings("all") - public BuilderSingularToBuilderWithNullBuilder elem(final String elem) { + public BuilderSingularToBuilderWithNull.BuilderSingularToBuilderWithNullBuilder elem(final String elem) { if (this.elems == null) this.elems = new java.util.ArrayList(); this.elems.add(elem); return this; } @java.lang.SuppressWarnings("all") - public BuilderSingularToBuilderWithNullBuilder elems(final java.util.Collection elems) { + public BuilderSingularToBuilderWithNull.BuilderSingularToBuilderWithNullBuilder elems(final java.util.Collection elems) { if (this.elems == null) this.elems = new java.util.ArrayList(); this.elems.addAll(elems); return this; } @java.lang.SuppressWarnings("all") - public BuilderSingularToBuilderWithNullBuilder clearElems() { + public BuilderSingularToBuilderWithNull.BuilderSingularToBuilderWithNullBuilder clearElems() { if (this.elems != null) this.elems.clear(); return this; } @@ -53,12 +53,12 @@ class BuilderSingularToBuilderWithNull { } } @java.lang.SuppressWarnings("all") - public static BuilderSingularToBuilderWithNullBuilder builder() { - return new BuilderSingularToBuilderWithNullBuilder(); + public static BuilderSingularToBuilderWithNull.BuilderSingularToBuilderWithNullBuilder builder() { + return new BuilderSingularToBuilderWithNull.BuilderSingularToBuilderWithNullBuilder(); } @java.lang.SuppressWarnings("all") - public BuilderSingularToBuilderWithNullBuilder toBuilder() { - final BuilderSingularToBuilderWithNullBuilder builder = new BuilderSingularToBuilderWithNullBuilder(); + public BuilderSingularToBuilderWithNull.BuilderSingularToBuilderWithNullBuilder toBuilder() { + final BuilderSingularToBuilderWithNull.BuilderSingularToBuilderWithNullBuilder builder = new BuilderSingularToBuilderWithNull.BuilderSingularToBuilderWithNullBuilder(); if (this.elems != null) builder.elems(this.elems); return builder; } diff --git a/test/transform/resource/after-delombok/BuilderSingularToBuilderWithNullWithSetterPrefix.java b/test/transform/resource/after-delombok/BuilderSingularToBuilderWithNullWithSetterPrefix.java index 5f42d87e..79f11978 100644 --- a/test/transform/resource/after-delombok/BuilderSingularToBuilderWithNullWithSetterPrefix.java +++ b/test/transform/resource/after-delombok/BuilderSingularToBuilderWithNullWithSetterPrefix.java @@ -15,19 +15,19 @@ class BuilderSingularToBuilderWithNullWithSetterPrefix { BuilderSingularToBuilderWithNullWithSetterPrefixBuilder() { } @java.lang.SuppressWarnings("all") - public BuilderSingularToBuilderWithNullWithSetterPrefixBuilder withElem(final String elem) { + public BuilderSingularToBuilderWithNullWithSetterPrefix.BuilderSingularToBuilderWithNullWithSetterPrefixBuilder withElem(final String elem) { if (this.elems == null) this.elems = new java.util.ArrayList(); this.elems.add(elem); return this; } @java.lang.SuppressWarnings("all") - public BuilderSingularToBuilderWithNullWithSetterPrefixBuilder withElems(final java.util.Collection elems) { + public BuilderSingularToBuilderWithNullWithSetterPrefix.BuilderSingularToBuilderWithNullWithSetterPrefixBuilder withElems(final java.util.Collection elems) { if (this.elems == null) this.elems = new java.util.ArrayList(); this.elems.addAll(elems); return this; } @java.lang.SuppressWarnings("all") - public BuilderSingularToBuilderWithNullWithSetterPrefixBuilder clearElems() { + public BuilderSingularToBuilderWithNullWithSetterPrefix.BuilderSingularToBuilderWithNullWithSetterPrefixBuilder clearElems() { if (this.elems != null) this.elems.clear(); return this; } @@ -53,12 +53,12 @@ class BuilderSingularToBuilderWithNullWithSetterPrefix { } } @java.lang.SuppressWarnings("all") - public static BuilderSingularToBuilderWithNullWithSetterPrefixBuilder builder() { - return new BuilderSingularToBuilderWithNullWithSetterPrefixBuilder(); + public static BuilderSingularToBuilderWithNullWithSetterPrefix.BuilderSingularToBuilderWithNullWithSetterPrefixBuilder builder() { + return new BuilderSingularToBuilderWithNullWithSetterPrefix.BuilderSingularToBuilderWithNullWithSetterPrefixBuilder(); } @java.lang.SuppressWarnings("all") - public BuilderSingularToBuilderWithNullWithSetterPrefixBuilder toBuilder() { - final BuilderSingularToBuilderWithNullWithSetterPrefixBuilder builder = new BuilderSingularToBuilderWithNullWithSetterPrefixBuilder(); + public BuilderSingularToBuilderWithNullWithSetterPrefix.BuilderSingularToBuilderWithNullWithSetterPrefixBuilder toBuilder() { + final BuilderSingularToBuilderWithNullWithSetterPrefix.BuilderSingularToBuilderWithNullWithSetterPrefixBuilder builder = new BuilderSingularToBuilderWithNullWithSetterPrefix.BuilderSingularToBuilderWithNullWithSetterPrefixBuilder(); if (this.elems != null) builder.withElems(this.elems); return builder; } diff --git a/test/transform/resource/after-delombok/BuilderSingularWildcardListsWithToBuilder.java b/test/transform/resource/after-delombok/BuilderSingularWildcardListsWithToBuilder.java index f0acf4f2..ec05ea2d 100644 --- a/test/transform/resource/after-delombok/BuilderSingularWildcardListsWithToBuilder.java +++ b/test/transform/resource/after-delombok/BuilderSingularWildcardListsWithToBuilder.java @@ -18,36 +18,36 @@ class BuilderSingularWildcardListsWithToBuilder { BuilderSingularWildcardListsWithToBuilderBuilder() { } @java.lang.SuppressWarnings("all") - public BuilderSingularWildcardListsWithToBuilderBuilder object(final java.lang.Object object) { + public BuilderSingularWildcardListsWithToBuilder.BuilderSingularWildcardListsWithToBuilderBuilder object(final java.lang.Object object) { if (this.objects == null) this.objects = new java.util.ArrayList(); this.objects.add(object); return this; } @java.lang.SuppressWarnings("all") - public BuilderSingularWildcardListsWithToBuilderBuilder objects(final java.util.Collection objects) { + public BuilderSingularWildcardListsWithToBuilder.BuilderSingularWildcardListsWithToBuilderBuilder objects(final java.util.Collection objects) { if (this.objects == null) this.objects = new java.util.ArrayList(); this.objects.addAll(objects); return this; } @java.lang.SuppressWarnings("all") - public BuilderSingularWildcardListsWithToBuilderBuilder clearObjects() { + public BuilderSingularWildcardListsWithToBuilder.BuilderSingularWildcardListsWithToBuilderBuilder clearObjects() { if (this.objects != null) this.objects.clear(); return this; } @java.lang.SuppressWarnings("all") - public BuilderSingularWildcardListsWithToBuilderBuilder number(final Number number) { + public BuilderSingularWildcardListsWithToBuilder.BuilderSingularWildcardListsWithToBuilderBuilder number(final Number number) { if (this.numbers == null) this.numbers = new java.util.ArrayList(); this.numbers.add(number); return this; } @java.lang.SuppressWarnings("all") - public BuilderSingularWildcardListsWithToBuilderBuilder numbers(final java.util.Collection numbers) { + public BuilderSingularWildcardListsWithToBuilder.BuilderSingularWildcardListsWithToBuilderBuilder numbers(final java.util.Collection numbers) { if (this.numbers == null) this.numbers = new java.util.ArrayList(); this.numbers.addAll(numbers); return this; } @java.lang.SuppressWarnings("all") - public BuilderSingularWildcardListsWithToBuilderBuilder clearNumbers() { + public BuilderSingularWildcardListsWithToBuilder.BuilderSingularWildcardListsWithToBuilderBuilder clearNumbers() { if (this.numbers != null) this.numbers.clear(); return this; } @@ -84,12 +84,12 @@ class BuilderSingularWildcardListsWithToBuilder { } } @java.lang.SuppressWarnings("all") - public static BuilderSingularWildcardListsWithToBuilderBuilder builder() { - return new BuilderSingularWildcardListsWithToBuilderBuilder(); + public static BuilderSingularWildcardListsWithToBuilder.BuilderSingularWildcardListsWithToBuilderBuilder builder() { + return new BuilderSingularWildcardListsWithToBuilder.BuilderSingularWildcardListsWithToBuilderBuilder(); } @java.lang.SuppressWarnings("all") - public BuilderSingularWildcardListsWithToBuilderBuilder toBuilder() { - final BuilderSingularWildcardListsWithToBuilderBuilder builder = new BuilderSingularWildcardListsWithToBuilderBuilder(); + public BuilderSingularWildcardListsWithToBuilder.BuilderSingularWildcardListsWithToBuilderBuilder toBuilder() { + final BuilderSingularWildcardListsWithToBuilder.BuilderSingularWildcardListsWithToBuilderBuilder builder = new BuilderSingularWildcardListsWithToBuilder.BuilderSingularWildcardListsWithToBuilderBuilder(); if (this.objects != null) builder.objects(this.objects); if (this.numbers != null) builder.numbers(this.numbers); return builder; diff --git a/test/transform/resource/after-delombok/BuilderSingularWildcardListsWithToBuilderWithSetterPrefix.java b/test/transform/resource/after-delombok/BuilderSingularWildcardListsWithToBuilderWithSetterPrefix.java deleted file mode 100644 index 367f0ac1..00000000 --- a/test/transform/resource/after-delombok/BuilderSingularWildcardListsWithToBuilderWithSetterPrefix.java +++ /dev/null @@ -1,97 +0,0 @@ -import java.util.List; -import java.util.Collection; -class BuilderSingularWildcardListsWithToBuilderWithSetterPrefix { - private List objects; - private Collection numbers; - @java.lang.SuppressWarnings("all") - BuilderSingularWildcardListsWithToBuilderWithSetterPrefix(final List objects, final Collection numbers) { - this.objects = objects; - this.numbers = numbers; - } - @java.lang.SuppressWarnings("all") - public static class BuilderSingularWildcardListsWithToBuilderWithSetterPrefixBuilder { - @java.lang.SuppressWarnings("all") - private java.util.ArrayList objects; - @java.lang.SuppressWarnings("all") - private java.util.ArrayList numbers; - @java.lang.SuppressWarnings("all") - BuilderSingularWildcardListsWithToBuilderWithSetterPrefixBuilder() { - } - @java.lang.SuppressWarnings("all") - public BuilderSingularWildcardListsWithToBuilderWithSetterPrefixBuilder withObject(final java.lang.Object object) { - if (this.objects == null) this.objects = new java.util.ArrayList(); - this.objects.add(object); - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderSingularWildcardListsWithToBuilderWithSetterPrefixBuilder withObjects(final java.util.Collection objects) { - if (this.objects == null) this.objects = new java.util.ArrayList(); - this.objects.addAll(objects); - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderSingularWildcardListsWithToBuilderWithSetterPrefixBuilder clearObjects() { - if (this.objects != null) this.objects.clear(); - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderSingularWildcardListsWithToBuilderWithSetterPrefixBuilder withNumber(final Number number) { - if (this.numbers == null) this.numbers = new java.util.ArrayList(); - this.numbers.add(number); - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderSingularWildcardListsWithToBuilderWithSetterPrefixBuilder withNumbers(final java.util.Collection numbers) { - if (this.numbers == null) this.numbers = new java.util.ArrayList(); - this.numbers.addAll(numbers); - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderSingularWildcardListsWithToBuilderWithSetterPrefixBuilder clearNumbers() { - if (this.numbers != null) this.numbers.clear(); - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderSingularWildcardListsWithToBuilderWithSetterPrefix build() { - java.util.List objects; - switch (this.objects == null ? 0 : this.objects.size()) { - case 0: - objects = java.util.Collections.emptyList(); - break; - case 1: - objects = java.util.Collections.singletonList(this.objects.get(0)); - break; - default: - objects = java.util.Collections.unmodifiableList(new java.util.ArrayList(this.objects)); - } - java.util.Collection numbers; - switch (this.numbers == null ? 0 : this.numbers.size()) { - case 0: - numbers = java.util.Collections.emptyList(); - break; - case 1: - numbers = java.util.Collections.singletonList(this.numbers.get(0)); - break; - default: - numbers = java.util.Collections.unmodifiableList(new java.util.ArrayList(this.numbers)); - } - return new BuilderSingularWildcardListsWithToBuilderWithSetterPrefix(objects, numbers); - } - @java.lang.Override - @java.lang.SuppressWarnings("all") - public java.lang.String toString() { - return "BuilderSingularWildcardListsWithToBuilderWithSetterPrefix.BuilderSingularWildcardListsWithToBuilderWithSetterPrefixBuilder(objects=" + this.objects + ", numbers=" + this.numbers + ")"; - } - } - @java.lang.SuppressWarnings("all") - public static BuilderSingularWildcardListsWithToBuilderWithSetterPrefixBuilder builder() { - return new BuilderSingularWildcardListsWithToBuilderWithSetterPrefixBuilder(); - } - @java.lang.SuppressWarnings("all") - public BuilderSingularWildcardListsWithToBuilderWithSetterPrefixBuilder toBuilder() { - final BuilderSingularWildcardListsWithToBuilderWithSetterPrefixBuilder builder = new BuilderSingularWildcardListsWithToBuilderWithSetterPrefixBuilder(); - if (this.objects != null) builder.withObjects(this.objects); - if (this.numbers != null) builder.withNumbers(this.numbers); - return builder; - } -} diff --git a/test/transform/resource/after-delombok/BuilderSingularWithPrefixes.java b/test/transform/resource/after-delombok/BuilderSingularWithPrefixes.java index e103d6dd..976866d3 100644 --- a/test/transform/resource/after-delombok/BuilderSingularWithPrefixes.java +++ b/test/transform/resource/after-delombok/BuilderSingularWithPrefixes.java @@ -12,19 +12,19 @@ class BuilderSingularWithPrefixes { BuilderSingularWithPrefixesBuilder() { } @java.lang.SuppressWarnings("all") - public BuilderSingularWithPrefixesBuilder elem(final String elem) { + public BuilderSingularWithPrefixes.BuilderSingularWithPrefixesBuilder elem(final String elem) { if (this.elems == null) this.elems = new java.util.ArrayList(); this.elems.add(elem); return this; } @java.lang.SuppressWarnings("all") - public BuilderSingularWithPrefixesBuilder elems(final java.util.Collection elems) { + public BuilderSingularWithPrefixes.BuilderSingularWithPrefixesBuilder elems(final java.util.Collection elems) { if (this.elems == null) this.elems = new java.util.ArrayList(); this.elems.addAll(elems); return this; } @java.lang.SuppressWarnings("all") - public BuilderSingularWithPrefixesBuilder clearElems() { + public BuilderSingularWithPrefixes.BuilderSingularWithPrefixesBuilder clearElems() { if (this.elems != null) this.elems.clear(); return this; } @@ -50,7 +50,7 @@ class BuilderSingularWithPrefixes { } } @java.lang.SuppressWarnings("all") - public static BuilderSingularWithPrefixesBuilder builder() { - return new BuilderSingularWithPrefixesBuilder(); + public static BuilderSingularWithPrefixes.BuilderSingularWithPrefixesBuilder builder() { + return new BuilderSingularWithPrefixes.BuilderSingularWithPrefixesBuilder(); } } diff --git a/test/transform/resource/after-delombok/BuilderSingularWithPrefixesWithSetterPrefix.java b/test/transform/resource/after-delombok/BuilderSingularWithPrefixesWithSetterPrefix.java index 2f163caf..e2be79de 100644 --- a/test/transform/resource/after-delombok/BuilderSingularWithPrefixesWithSetterPrefix.java +++ b/test/transform/resource/after-delombok/BuilderSingularWithPrefixesWithSetterPrefix.java @@ -12,19 +12,19 @@ class BuilderSingularWithPrefixesWithSetterPrefix { BuilderSingularWithPrefixesWithSetterPrefixBuilder() { } @java.lang.SuppressWarnings("all") - public BuilderSingularWithPrefixesWithSetterPrefixBuilder withElem(final String elem) { + public BuilderSingularWithPrefixesWithSetterPrefix.BuilderSingularWithPrefixesWithSetterPrefixBuilder withElem(final String elem) { if (this.elems == null) this.elems = new java.util.ArrayList(); this.elems.add(elem); return this; } @java.lang.SuppressWarnings("all") - public BuilderSingularWithPrefixesWithSetterPrefixBuilder withElems(final java.util.Collection elems) { + public BuilderSingularWithPrefixesWithSetterPrefix.BuilderSingularWithPrefixesWithSetterPrefixBuilder withElems(final java.util.Collection elems) { if (this.elems == null) this.elems = new java.util.ArrayList(); this.elems.addAll(elems); return this; } @java.lang.SuppressWarnings("all") - public BuilderSingularWithPrefixesWithSetterPrefixBuilder clearElems() { + public BuilderSingularWithPrefixesWithSetterPrefix.BuilderSingularWithPrefixesWithSetterPrefixBuilder clearElems() { if (this.elems != null) this.elems.clear(); return this; } @@ -50,7 +50,7 @@ class BuilderSingularWithPrefixesWithSetterPrefix { } } @java.lang.SuppressWarnings("all") - public static BuilderSingularWithPrefixesWithSetterPrefixBuilder builder() { - return new BuilderSingularWithPrefixesWithSetterPrefixBuilder(); + public static BuilderSingularWithPrefixesWithSetterPrefix.BuilderSingularWithPrefixesWithSetterPrefixBuilder builder() { + return new BuilderSingularWithPrefixesWithSetterPrefix.BuilderSingularWithPrefixesWithSetterPrefixBuilder(); } } diff --git a/test/transform/resource/after-delombok/BuilderTypeAnnos.java b/test/transform/resource/after-delombok/BuilderTypeAnnos.java index 8a31762a..92a7e3f1 100644 --- a/test/transform/resource/after-delombok/BuilderTypeAnnos.java +++ b/test/transform/resource/after-delombok/BuilderTypeAnnos.java @@ -23,7 +23,7 @@ class BuilderTypeAnnos { BuilderTypeAnnosBuilder() { } @java.lang.SuppressWarnings("all") - public BuilderTypeAnnosBuilder foo(@TA final List foo) { + public BuilderTypeAnnos.BuilderTypeAnnosBuilder foo(@TA final List foo) { this.foo = foo; return this; } @@ -38,8 +38,8 @@ class BuilderTypeAnnos { } } @java.lang.SuppressWarnings("all") - public static BuilderTypeAnnosBuilder builder() { - return new BuilderTypeAnnosBuilder(); + public static BuilderTypeAnnos.BuilderTypeAnnosBuilder builder() { + return new BuilderTypeAnnos.BuilderTypeAnnosBuilder(); } } diff --git a/test/transform/resource/after-delombok/BuilderTypeAnnosWithSetterPrefix.java b/test/transform/resource/after-delombok/BuilderTypeAnnosWithSetterPrefix.java index 0d4f8059..51261508 100644 --- a/test/transform/resource/after-delombok/BuilderTypeAnnosWithSetterPrefix.java +++ b/test/transform/resource/after-delombok/BuilderTypeAnnosWithSetterPrefix.java @@ -23,7 +23,7 @@ class BuilderTypeAnnosWithSetterPrefix { BuilderTypeAnnosWithSetterPrefixBuilder() { } @java.lang.SuppressWarnings("all") - public BuilderTypeAnnosWithSetterPrefixBuilder withFoo(@TA final List foo) { + public BuilderTypeAnnosWithSetterPrefix.BuilderTypeAnnosWithSetterPrefixBuilder withFoo(@TA final List foo) { this.foo = foo; return this; } @@ -38,8 +38,8 @@ class BuilderTypeAnnosWithSetterPrefix { } } @java.lang.SuppressWarnings("all") - public static BuilderTypeAnnosWithSetterPrefixBuilder builder() { - return new BuilderTypeAnnosWithSetterPrefixBuilder(); + public static BuilderTypeAnnosWithSetterPrefix.BuilderTypeAnnosWithSetterPrefixBuilder builder() { + return new BuilderTypeAnnosWithSetterPrefix.BuilderTypeAnnosWithSetterPrefixBuilder(); } } diff --git a/test/transform/resource/after-delombok/BuilderValueData.java b/test/transform/resource/after-delombok/BuilderValueData.java index e1c107da..0af32fe5 100644 --- a/test/transform/resource/after-delombok/BuilderValueData.java +++ b/test/transform/resource/after-delombok/BuilderValueData.java @@ -20,8 +20,8 @@ final class BuilderAndValue { } } @java.lang.SuppressWarnings("all") - public static BuilderAndValueBuilder builder() { - return new BuilderAndValueBuilder(); + public static BuilderAndValue.BuilderAndValueBuilder builder() { + return new BuilderAndValue.BuilderAndValueBuilder(); } @java.lang.SuppressWarnings("all") public int getZero() { @@ -72,8 +72,8 @@ class BuilderAndData { } } @java.lang.SuppressWarnings("all") - public static BuilderAndDataBuilder builder() { - return new BuilderAndDataBuilder(); + public static BuilderAndData.BuilderAndDataBuilder builder() { + return new BuilderAndData.BuilderAndDataBuilder(); } @java.lang.SuppressWarnings("all") public int getZero() { diff --git a/test/transform/resource/after-delombok/BuilderValueDataWithSetterPrefix.java b/test/transform/resource/after-delombok/BuilderValueDataWithSetterPrefix.java index 87905208..de83d5db 100644 --- a/test/transform/resource/after-delombok/BuilderValueDataWithSetterPrefix.java +++ b/test/transform/resource/after-delombok/BuilderValueDataWithSetterPrefix.java @@ -20,8 +20,8 @@ final class BuilderAndValueWithSetterPrefix { } } @java.lang.SuppressWarnings("all") - public static BuilderAndValueWithSetterPrefixBuilder builder() { - return new BuilderAndValueWithSetterPrefixBuilder(); + public static BuilderAndValueWithSetterPrefix.BuilderAndValueWithSetterPrefixBuilder builder() { + return new BuilderAndValueWithSetterPrefix.BuilderAndValueWithSetterPrefixBuilder(); } @java.lang.SuppressWarnings("all") public int getZero() { @@ -72,8 +72,8 @@ class BuilderAndDataWithSetterPrefix { } } @java.lang.SuppressWarnings("all") - public static BuilderAndDataWithSetterPrefixBuilder builder() { - return new BuilderAndDataWithSetterPrefixBuilder(); + public static BuilderAndDataWithSetterPrefix.BuilderAndDataWithSetterPrefixBuilder builder() { + return new BuilderAndDataWithSetterPrefix.BuilderAndDataWithSetterPrefixBuilder(); } @java.lang.SuppressWarnings("all") public int getZero() { diff --git a/test/transform/resource/after-delombok/BuilderWithAccessors.java b/test/transform/resource/after-delombok/BuilderWithAccessors.java index e6a6da79..f13200cf 100644 --- a/test/transform/resource/after-delombok/BuilderWithAccessors.java +++ b/test/transform/resource/after-delombok/BuilderWithAccessors.java @@ -24,22 +24,22 @@ class BuilderWithAccessors { BuilderWithAccessorsBuilder() { } @java.lang.SuppressWarnings("all") - public BuilderWithAccessorsBuilder plower(final int plower) { + public BuilderWithAccessors.BuilderWithAccessorsBuilder plower(final int plower) { this.plower = plower; return this; } @java.lang.SuppressWarnings("all") - public BuilderWithAccessorsBuilder upper(final int upper) { + public BuilderWithAccessors.BuilderWithAccessorsBuilder upper(final int upper) { this.upper = upper; return this; } @java.lang.SuppressWarnings("all") - public BuilderWithAccessorsBuilder foo(final int foo) { + public BuilderWithAccessors.BuilderWithAccessorsBuilder foo(final int foo) { this.foo = foo; return this; } @java.lang.SuppressWarnings("all") - public BuilderWithAccessorsBuilder _bar(final int _bar) { + public BuilderWithAccessors.BuilderWithAccessorsBuilder _bar(final int _bar) { this._bar = _bar; return this; } @@ -54,7 +54,7 @@ class BuilderWithAccessors { } } @java.lang.SuppressWarnings("all") - public static BuilderWithAccessorsBuilder builder() { - return new BuilderWithAccessorsBuilder(); + public static BuilderWithAccessors.BuilderWithAccessorsBuilder builder() { + return new BuilderWithAccessors.BuilderWithAccessorsBuilder(); } } diff --git a/test/transform/resource/after-delombok/BuilderWithAccessorsWithSetterPrefix.java b/test/transform/resource/after-delombok/BuilderWithAccessorsWithSetterPrefix.java deleted file mode 100644 index 45a79fdc..00000000 --- a/test/transform/resource/after-delombok/BuilderWithAccessorsWithSetterPrefix.java +++ /dev/null @@ -1,60 +0,0 @@ -class BuilderWithAccessorsWithSetterPrefix { - private final int plower; - private final int pUpper; - private int _foo; - private int __bar; - @java.lang.SuppressWarnings("all") - BuilderWithAccessorsWithSetterPrefix(final int plower, final int upper, final int foo, final int _bar) { - this.plower = plower; - this.pUpper = upper; - this._foo = foo; - this.__bar = _bar; - } - @java.lang.SuppressWarnings("all") - public static class BuilderWithAccessorsWithSetterPrefixBuilder { - @java.lang.SuppressWarnings("all") - private int plower; - @java.lang.SuppressWarnings("all") - private int upper; - @java.lang.SuppressWarnings("all") - private int foo; - @java.lang.SuppressWarnings("all") - private int _bar; - @java.lang.SuppressWarnings("all") - BuilderWithAccessorsWithSetterPrefixBuilder() { - } - @java.lang.SuppressWarnings("all") - public BuilderWithAccessorsWithSetterPrefixBuilder withPlower(final int plower) { - this.plower = plower; - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderWithAccessorsWithSetterPrefixBuilder withUpper(final int upper) { - this.upper = upper; - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderWithAccessorsWithSetterPrefixBuilder withFoo(final int foo) { - this.foo = foo; - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderWithAccessorsWithSetterPrefixBuilder with_bar(final int _bar) { - this._bar = _bar; - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderWithAccessorsWithSetterPrefix build() { - return new BuilderWithAccessorsWithSetterPrefix(plower, upper, foo, _bar); - } - @java.lang.Override - @java.lang.SuppressWarnings("all") - public java.lang.String toString() { - return "BuilderWithAccessorsWithSetterPrefix.BuilderWithAccessorsWithSetterPrefixBuilder(plower=" + this.plower + ", upper=" + this.upper + ", foo=" + this.foo + ", _bar=" + this._bar + ")"; - } - } - @java.lang.SuppressWarnings("all") - public static BuilderWithAccessorsWithSetterPrefixBuilder builder() { - return new BuilderWithAccessorsWithSetterPrefixBuilder(); - } -} diff --git a/test/transform/resource/after-delombok/BuilderWithBadNames.java b/test/transform/resource/after-delombok/BuilderWithBadNames.java index f413be23..fee61299 100644 --- a/test/transform/resource/after-delombok/BuilderWithBadNames.java +++ b/test/transform/resource/after-delombok/BuilderWithBadNames.java @@ -16,12 +16,12 @@ public class BuilderWithBadNames { BuilderWithBadNamesBuilder() { } @java.lang.SuppressWarnings("all") - public BuilderWithBadNamesBuilder build(final String build) { + public BuilderWithBadNames.BuilderWithBadNamesBuilder build(final String build) { this.build = build; return this; } @java.lang.SuppressWarnings("all") - public BuilderWithBadNamesBuilder toString(final String toString) { + public BuilderWithBadNames.BuilderWithBadNamesBuilder toString(final String toString) { this.toString = toString; return this; } @@ -36,7 +36,7 @@ public class BuilderWithBadNames { } } @java.lang.SuppressWarnings("all") - public static BuilderWithBadNamesBuilder builder() { - return new BuilderWithBadNamesBuilder(); + public static BuilderWithBadNames.BuilderWithBadNamesBuilder builder() { + return new BuilderWithBadNames.BuilderWithBadNamesBuilder(); } } diff --git a/test/transform/resource/after-delombok/BuilderWithBadNamesWithSetterPrefix.java b/test/transform/resource/after-delombok/BuilderWithBadNamesWithSetterPrefix.java deleted file mode 100644 index be7a78c7..00000000 --- a/test/transform/resource/after-delombok/BuilderWithBadNamesWithSetterPrefix.java +++ /dev/null @@ -1,42 +0,0 @@ -public class BuilderWithBadNamesWithSetterPrefix { - String build; - String toString; - @java.lang.SuppressWarnings("all") - BuilderWithBadNamesWithSetterPrefix(final String build, final String toString) { - this.build = build; - this.toString = toString; - } - @java.lang.SuppressWarnings("all") - public static class BuilderWithBadNamesWithSetterPrefixBuilder { - @java.lang.SuppressWarnings("all") - private String build; - @java.lang.SuppressWarnings("all") - private String toString; - @java.lang.SuppressWarnings("all") - BuilderWithBadNamesWithSetterPrefixBuilder() { - } - @java.lang.SuppressWarnings("all") - public BuilderWithBadNamesWithSetterPrefixBuilder withBuild(final String build) { - this.build = build; - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderWithBadNamesWithSetterPrefixBuilder withToString(final String toString) { - this.toString = toString; - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderWithBadNamesWithSetterPrefix build() { - return new BuilderWithBadNamesWithSetterPrefix(build, toString); - } - @java.lang.Override - @java.lang.SuppressWarnings("all") - public java.lang.String toString() { - return "BuilderWithBadNamesWithSetterPrefix.BuilderWithBadNamesWithSetterPrefixBuilder(build=" + this.build + ", toString=" + this.toString + ")"; - } - } - @java.lang.SuppressWarnings("all") - public static BuilderWithBadNamesWithSetterPrefixBuilder builder() { - return new BuilderWithBadNamesWithSetterPrefixBuilder(); - } -} diff --git a/test/transform/resource/after-delombok/BuilderWithDeprecated.java b/test/transform/resource/after-delombok/BuilderWithDeprecated.java index f06a11f2..2ac252c5 100644 --- a/test/transform/resource/after-delombok/BuilderWithDeprecated.java +++ b/test/transform/resource/after-delombok/BuilderWithDeprecated.java @@ -35,53 +35,53 @@ public class BuilderWithDeprecated { */ @java.lang.Deprecated @java.lang.SuppressWarnings("all") - public BuilderWithDeprecatedBuilder dep1(final String dep1) { + public BuilderWithDeprecated.BuilderWithDeprecatedBuilder dep1(final String dep1) { this.dep1 = dep1; return this; } @java.lang.Deprecated @java.lang.SuppressWarnings("all") - public BuilderWithDeprecatedBuilder dep2(final int dep2) { + public BuilderWithDeprecated.BuilderWithDeprecatedBuilder dep2(final int dep2) { this.dep2 = dep2; return this; } @java.lang.Deprecated @java.lang.SuppressWarnings("all") - public BuilderWithDeprecatedBuilder string(final String string) { + public BuilderWithDeprecated.BuilderWithDeprecatedBuilder string(final String string) { if (this.strings == null) this.strings = new java.util.ArrayList(); this.strings.add(string); return this; } @java.lang.Deprecated @java.lang.SuppressWarnings("all") - public BuilderWithDeprecatedBuilder strings(final java.util.Collection strings) { + public BuilderWithDeprecated.BuilderWithDeprecatedBuilder strings(final java.util.Collection strings) { if (this.strings == null) this.strings = new java.util.ArrayList(); this.strings.addAll(strings); return this; } @java.lang.Deprecated @java.lang.SuppressWarnings("all") - public BuilderWithDeprecatedBuilder clearStrings() { + public BuilderWithDeprecated.BuilderWithDeprecatedBuilder clearStrings() { if (this.strings != null) this.strings.clear(); return this; } @java.lang.Deprecated @java.lang.SuppressWarnings("all") - public BuilderWithDeprecatedBuilder number(final Integer number) { + public BuilderWithDeprecated.BuilderWithDeprecatedBuilder number(final Integer number) { if (this.numbers == null) this.numbers = com.google.common.collect.ImmutableList.builder(); this.numbers.add(number); return this; } @java.lang.Deprecated @java.lang.SuppressWarnings("all") - public BuilderWithDeprecatedBuilder numbers(final java.lang.Iterable numbers) { + public BuilderWithDeprecated.BuilderWithDeprecatedBuilder numbers(final java.lang.Iterable numbers) { if (this.numbers == null) this.numbers = com.google.common.collect.ImmutableList.builder(); this.numbers.addAll(numbers); return this; } @java.lang.Deprecated @java.lang.SuppressWarnings("all") - public BuilderWithDeprecatedBuilder clearNumbers() { + public BuilderWithDeprecated.BuilderWithDeprecatedBuilder clearNumbers() { this.numbers = null; return this; } @@ -108,7 +108,7 @@ public class BuilderWithDeprecated { } } @java.lang.SuppressWarnings("all") - public static BuilderWithDeprecatedBuilder builder() { - return new BuilderWithDeprecatedBuilder(); + public static BuilderWithDeprecated.BuilderWithDeprecatedBuilder builder() { + return new BuilderWithDeprecated.BuilderWithDeprecatedBuilder(); } } diff --git a/test/transform/resource/after-delombok/BuilderWithDeprecatedWithSetterPrefix.java b/test/transform/resource/after-delombok/BuilderWithDeprecatedWithSetterPrefix.java deleted file mode 100644 index 5f6f2c32..00000000 --- a/test/transform/resource/after-delombok/BuilderWithDeprecatedWithSetterPrefix.java +++ /dev/null @@ -1,114 +0,0 @@ -import com.google.common.collect.ImmutableList; -public class BuilderWithDeprecatedWithSetterPrefix { - /** - * @deprecated since always - */ - String dep1; - @Deprecated - int dep2; - @Deprecated - java.util.List strings; - @Deprecated - ImmutableList numbers; - @java.lang.SuppressWarnings("all") - BuilderWithDeprecatedWithSetterPrefix(final String dep1, final int dep2, final java.util.List strings, final ImmutableList numbers) { - this.dep1 = dep1; - this.dep2 = dep2; - this.strings = strings; - this.numbers = numbers; - } - @java.lang.SuppressWarnings("all") - public static class BuilderWithDeprecatedWithSetterPrefixBuilder { - @java.lang.SuppressWarnings("all") - private String dep1; - @java.lang.SuppressWarnings("all") - private int dep2; - @java.lang.SuppressWarnings("all") - private java.util.ArrayList strings; - @java.lang.SuppressWarnings("all") - private com.google.common.collect.ImmutableList.Builder numbers; - @java.lang.SuppressWarnings("all") - BuilderWithDeprecatedWithSetterPrefixBuilder() { - } - /** - * @deprecated since always - */ - @java.lang.Deprecated - @java.lang.SuppressWarnings("all") - public BuilderWithDeprecatedWithSetterPrefixBuilder withDep1(final String dep1) { - this.dep1 = dep1; - return this; - } - @java.lang.Deprecated - @java.lang.SuppressWarnings("all") - public BuilderWithDeprecatedWithSetterPrefixBuilder withDep2(final int dep2) { - this.dep2 = dep2; - return this; - } - @java.lang.Deprecated - @java.lang.SuppressWarnings("all") - public BuilderWithDeprecatedWithSetterPrefixBuilder withString(final String string) { - if (this.strings == null) this.strings = new java.util.ArrayList(); - this.strings.add(string); - return this; - } - @java.lang.Deprecated - @java.lang.SuppressWarnings("all") - public BuilderWithDeprecatedWithSetterPrefixBuilder withStrings(final java.util.Collection strings) { - if (this.strings == null) this.strings = new java.util.ArrayList(); - this.strings.addAll(strings); - return this; - } - @java.lang.Deprecated - @java.lang.SuppressWarnings("all") - public BuilderWithDeprecatedWithSetterPrefixBuilder clearStrings() { - if (this.strings != null) this.strings.clear(); - return this; - } - @java.lang.Deprecated - @java.lang.SuppressWarnings("all") - public BuilderWithDeprecatedWithSetterPrefixBuilder withNumber(final Integer number) { - if (this.numbers == null) this.numbers = com.google.common.collect.ImmutableList.builder(); - this.numbers.add(number); - return this; - } - @java.lang.Deprecated - @java.lang.SuppressWarnings("all") - public BuilderWithDeprecatedWithSetterPrefixBuilder withNumbers(final java.lang.Iterable numbers) { - if (this.numbers == null) this.numbers = com.google.common.collect.ImmutableList.builder(); - this.numbers.addAll(numbers); - return this; - } - @java.lang.Deprecated - @java.lang.SuppressWarnings("all") - public BuilderWithDeprecatedWithSetterPrefixBuilder clearNumbers() { - this.numbers = null; - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderWithDeprecatedWithSetterPrefix build() { - java.util.List strings; - switch (this.strings == null ? 0 : this.strings.size()) { - case 0: - strings = java.util.Collections.emptyList(); - break; - case 1: - strings = java.util.Collections.singletonList(this.strings.get(0)); - break; - default: - strings = java.util.Collections.unmodifiableList(new java.util.ArrayList(this.strings)); - } - com.google.common.collect.ImmutableList numbers = this.numbers == null ? com.google.common.collect.ImmutableList.of() : this.numbers.build(); - return new BuilderWithDeprecatedWithSetterPrefix(dep1, dep2, strings, numbers); - } - @java.lang.Override - @java.lang.SuppressWarnings("all") - public java.lang.String toString() { - return "BuilderWithDeprecatedWithSetterPrefix.BuilderWithDeprecatedWithSetterPrefixBuilder(dep1=" + this.dep1 + ", dep2=" + this.dep2 + ", strings=" + this.strings + ", numbers=" + this.numbers + ")"; - } - } - @java.lang.SuppressWarnings("all") - public static BuilderWithDeprecatedWithSetterPrefixBuilder builder() { - return new BuilderWithDeprecatedWithSetterPrefixBuilder(); - } -} diff --git a/test/transform/resource/after-delombok/BuilderWithExistingBuilderClass.java b/test/transform/resource/after-delombok/BuilderWithExistingBuilderClass.java index 0a5edacd..82597b6e 100644 --- a/test/transform/resource/after-delombok/BuilderWithExistingBuilderClass.java +++ b/test/transform/resource/after-delombok/BuilderWithExistingBuilderClass.java @@ -14,12 +14,12 @@ class BuilderWithExistingBuilderClass { BuilderWithExistingBuilderClassBuilder() { } @java.lang.SuppressWarnings("all") - public BuilderWithExistingBuilderClassBuilder arg1(final Z arg1) { + public BuilderWithExistingBuilderClass.BuilderWithExistingBuilderClassBuilder arg1(final Z arg1) { this.arg1 = arg1; return this; } @java.lang.SuppressWarnings("all") - public BuilderWithExistingBuilderClassBuilder arg3(final String arg3) { + public BuilderWithExistingBuilderClass.BuilderWithExistingBuilderClassBuilder arg3(final String arg3) { this.arg3 = arg3; return this; } @@ -34,7 +34,7 @@ class BuilderWithExistingBuilderClass { } } @java.lang.SuppressWarnings("all") - public static BuilderWithExistingBuilderClassBuilder builder() { - return new BuilderWithExistingBuilderClassBuilder(); + public static BuilderWithExistingBuilderClass.BuilderWithExistingBuilderClassBuilder builder() { + return new BuilderWithExistingBuilderClass.BuilderWithExistingBuilderClassBuilder(); } } diff --git a/test/transform/resource/after-delombok/BuilderWithExistingBuilderClassWithSetterPrefix.java b/test/transform/resource/after-delombok/BuilderWithExistingBuilderClassWithSetterPrefix.java index 95f89c9d..0d3dcab8 100644 --- a/test/transform/resource/after-delombok/BuilderWithExistingBuilderClassWithSetterPrefix.java +++ b/test/transform/resource/after-delombok/BuilderWithExistingBuilderClassWithSetterPrefix.java @@ -14,12 +14,12 @@ class BuilderWithExistingBuilderClassWithSetterPrefix { BuilderWithExistingBuilderClassWithSetterPrefixBuilder() { } @java.lang.SuppressWarnings("all") - public BuilderWithExistingBuilderClassWithSetterPrefixBuilder withArg1(final Z arg1) { + public BuilderWithExistingBuilderClassWithSetterPrefix.BuilderWithExistingBuilderClassWithSetterPrefixBuilder withArg1(final Z arg1) { this.arg1 = arg1; return this; } @java.lang.SuppressWarnings("all") - public BuilderWithExistingBuilderClassWithSetterPrefixBuilder withArg3(final String arg3) { + public BuilderWithExistingBuilderClassWithSetterPrefix.BuilderWithExistingBuilderClassWithSetterPrefixBuilder withArg3(final String arg3) { this.arg3 = arg3; return this; } @@ -34,7 +34,7 @@ class BuilderWithExistingBuilderClassWithSetterPrefix { } } @java.lang.SuppressWarnings("all") - public static BuilderWithExistingBuilderClassWithSetterPrefixBuilder builder() { - return new BuilderWithExistingBuilderClassWithSetterPrefixBuilder(); + public static BuilderWithExistingBuilderClassWithSetterPrefix.BuilderWithExistingBuilderClassWithSetterPrefixBuilder builder() { + return new BuilderWithExistingBuilderClassWithSetterPrefix.BuilderWithExistingBuilderClassWithSetterPrefixBuilder(); } } diff --git a/test/transform/resource/after-delombok/BuilderWithNoBuilderMethod.java b/test/transform/resource/after-delombok/BuilderWithNoBuilderMethod.java index 35e2c79e..cfd86ef7 100644 --- a/test/transform/resource/after-delombok/BuilderWithNoBuilderMethod.java +++ b/test/transform/resource/after-delombok/BuilderWithNoBuilderMethod.java @@ -12,7 +12,7 @@ class BuilderWithNoBuilderMethod { BuilderWithNoBuilderMethodBuilder() { } @java.lang.SuppressWarnings("all") - public BuilderWithNoBuilderMethodBuilder a(final String a) { + public BuilderWithNoBuilderMethod.BuilderWithNoBuilderMethodBuilder a(final String a) { this.a = a; return this; } @@ -27,7 +27,7 @@ class BuilderWithNoBuilderMethod { } } @java.lang.SuppressWarnings("all") - public BuilderWithNoBuilderMethodBuilder toBuilder() { - return new BuilderWithNoBuilderMethodBuilder().a(this.a); + public BuilderWithNoBuilderMethod.BuilderWithNoBuilderMethodBuilder toBuilder() { + return new BuilderWithNoBuilderMethod.BuilderWithNoBuilderMethodBuilder().a(this.a); } } diff --git a/test/transform/resource/after-delombok/BuilderWithNoBuilderMethodWithSetterPrefix.java b/test/transform/resource/after-delombok/BuilderWithNoBuilderMethodWithSetterPrefix.java deleted file mode 100644 index 0f478ed1..00000000 --- a/test/transform/resource/after-delombok/BuilderWithNoBuilderMethodWithSetterPrefix.java +++ /dev/null @@ -1,33 +0,0 @@ -class BuilderWithNoBuilderMethodWithSetterPrefix { - private String a = ""; - @java.lang.SuppressWarnings("all") - BuilderWithNoBuilderMethodWithSetterPrefix(final String a) { - this.a = a; - } - @java.lang.SuppressWarnings("all") - public static class BuilderWithNoBuilderMethodWithSetterPrefixBuilder { - @java.lang.SuppressWarnings("all") - private String a; - @java.lang.SuppressWarnings("all") - BuilderWithNoBuilderMethodWithSetterPrefixBuilder() { - } - @java.lang.SuppressWarnings("all") - public BuilderWithNoBuilderMethodWithSetterPrefixBuilder withA(final String a) { - this.a = a; - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderWithNoBuilderMethodWithSetterPrefix build() { - return new BuilderWithNoBuilderMethodWithSetterPrefix(a); - } - @java.lang.Override - @java.lang.SuppressWarnings("all") - public java.lang.String toString() { - return "BuilderWithNoBuilderMethodWithSetterPrefix.BuilderWithNoBuilderMethodWithSetterPrefixBuilder(a=" + this.a + ")"; - } - } - @java.lang.SuppressWarnings("all") - public BuilderWithNoBuilderMethodWithSetterPrefixBuilder toBuilder() { - return new BuilderWithNoBuilderMethodWithSetterPrefixBuilder().withA(this.a); - } -} diff --git a/test/transform/resource/after-delombok/BuilderWithNonNull.java b/test/transform/resource/after-delombok/BuilderWithNonNull.java index bee7d415..b32507da 100644 --- a/test/transform/resource/after-delombok/BuilderWithNonNull.java +++ b/test/transform/resource/after-delombok/BuilderWithNonNull.java @@ -16,7 +16,7 @@ class BuilderWithNonNull { BuilderWithNonNullBuilder() { } @java.lang.SuppressWarnings("all") - public BuilderWithNonNullBuilder id(@lombok.NonNull final String id) { + public BuilderWithNonNull.BuilderWithNonNullBuilder id(@lombok.NonNull final String id) { if (id == null) { throw new java.lang.NullPointerException("id is marked non-null but is null"); } @@ -34,7 +34,7 @@ class BuilderWithNonNull { } } @java.lang.SuppressWarnings("all") - public static BuilderWithNonNullBuilder builder() { - return new BuilderWithNonNullBuilder(); + public static BuilderWithNonNull.BuilderWithNonNullBuilder builder() { + return new BuilderWithNonNull.BuilderWithNonNullBuilder(); } } \ No newline at end of file diff --git a/test/transform/resource/after-delombok/BuilderWithNonNullWithSetterPrefix.java b/test/transform/resource/after-delombok/BuilderWithNonNullWithSetterPrefix.java index 49be1717..4faeb5ce 100644 --- a/test/transform/resource/after-delombok/BuilderWithNonNullWithSetterPrefix.java +++ b/test/transform/resource/after-delombok/BuilderWithNonNullWithSetterPrefix.java @@ -16,7 +16,7 @@ class BuilderWithNonNullWithSetterPrefix { BuilderWithNonNullWithSetterPrefixBuilder() { } @java.lang.SuppressWarnings("all") - public BuilderWithNonNullWithSetterPrefixBuilder withId(@lombok.NonNull final String id) { + public BuilderWithNonNullWithSetterPrefix.BuilderWithNonNullWithSetterPrefixBuilder withId(@lombok.NonNull final String id) { if (id == null) { throw new java.lang.NullPointerException("id is marked non-null but is null"); } @@ -34,7 +34,7 @@ class BuilderWithNonNullWithSetterPrefix { } } @java.lang.SuppressWarnings("all") - public static BuilderWithNonNullWithSetterPrefixBuilder builder() { - return new BuilderWithNonNullWithSetterPrefixBuilder(); + public static BuilderWithNonNullWithSetterPrefix.BuilderWithNonNullWithSetterPrefixBuilder builder() { + return new BuilderWithNonNullWithSetterPrefix.BuilderWithNonNullWithSetterPrefixBuilder(); } } diff --git a/test/transform/resource/after-delombok/BuilderWithRecursiveGenerics.java b/test/transform/resource/after-delombok/BuilderWithRecursiveGenerics.java index 7fb300e4..8a89d421 100644 --- a/test/transform/resource/after-delombok/BuilderWithRecursiveGenerics.java +++ b/test/transform/resource/after-delombok/BuilderWithRecursiveGenerics.java @@ -20,18 +20,18 @@ public class BuilderWithRecursiveGenerics { TestBuilder() { } @java.lang.SuppressWarnings("all") - public TestBuilder foo(final Foo foo) { + public BuilderWithRecursiveGenerics.Test.TestBuilder foo(final Foo foo) { this.foo = foo; return this; } @java.lang.SuppressWarnings("all") - public TestBuilder bar(final Bar bar) { + public BuilderWithRecursiveGenerics.Test.TestBuilder bar(final Bar bar) { this.bar = bar; return this; } @java.lang.SuppressWarnings("all") - public Test build() { - return new Test(foo, bar); + public BuilderWithRecursiveGenerics.Test build() { + return new BuilderWithRecursiveGenerics.Test(foo, bar); } @java.lang.Override @java.lang.SuppressWarnings("all") @@ -40,8 +40,8 @@ public class BuilderWithRecursiveGenerics { } } @java.lang.SuppressWarnings("all") - public static , Quz extends Inter> TestBuilder builder() { - return new TestBuilder(); + public static , Quz extends Inter> BuilderWithRecursiveGenerics.Test.TestBuilder builder() { + return new BuilderWithRecursiveGenerics.Test.TestBuilder(); } @java.lang.SuppressWarnings("all") public Foo getFoo() { diff --git a/test/transform/resource/after-delombok/BuilderWithRecursiveGenericsWithSetterPrefix.java b/test/transform/resource/after-delombok/BuilderWithRecursiveGenericsWithSetterPrefix.java deleted file mode 100644 index 04494ff9..00000000 --- a/test/transform/resource/after-delombok/BuilderWithRecursiveGenericsWithSetterPrefix.java +++ /dev/null @@ -1,85 +0,0 @@ -import java.util.Set; -public class BuilderWithRecursiveGenericsWithSetterPrefix { - interface Inter> { - } - public static final class Test, Quz extends Inter> { - private final Foo foo; - private final Bar bar; - @java.lang.SuppressWarnings("all") - Test(final Foo foo, final Bar bar) { - this.foo = foo; - this.bar = bar; - } - @java.lang.SuppressWarnings("all") - public static class TestBuilder, Quz extends Inter> { - @java.lang.SuppressWarnings("all") - private Foo foo; - @java.lang.SuppressWarnings("all") - private Bar bar; - @java.lang.SuppressWarnings("all") - TestBuilder() { - } - @java.lang.SuppressWarnings("all") - public TestBuilder withFoo(final Foo foo) { - this.foo = foo; - return this; - } - @java.lang.SuppressWarnings("all") - public TestBuilder withBar(final Bar bar) { - this.bar = bar; - return this; - } - @java.lang.SuppressWarnings("all") - public Test build() { - return new Test(foo, bar); - } - @java.lang.Override - @java.lang.SuppressWarnings("all") - public java.lang.String toString() { - return "BuilderWithRecursiveGenericsWithSetterPrefix.Test.TestBuilder(foo=" + this.foo + ", bar=" + this.bar + ")"; - } - } - @java.lang.SuppressWarnings("all") - public static , Quz extends Inter> TestBuilder builder() { - return new TestBuilder(); - } - @java.lang.SuppressWarnings("all") - public Foo getFoo() { - return this.foo; - } - @java.lang.SuppressWarnings("all") - public Bar getBar() { - return this.bar; - } - @java.lang.Override - @java.lang.SuppressWarnings("all") - public boolean equals(final java.lang.Object o) { - if (o == this) return true; - if (!(o instanceof BuilderWithRecursiveGenericsWithSetterPrefix.Test)) return false; - final BuilderWithRecursiveGenericsWithSetterPrefix.Test other = (BuilderWithRecursiveGenericsWithSetterPrefix.Test) o; - final java.lang.Object this$foo = this.getFoo(); - final java.lang.Object other$foo = other.getFoo(); - if (this$foo == null ? other$foo != null : !this$foo.equals(other$foo)) return false; - final java.lang.Object this$bar = this.getBar(); - final java.lang.Object other$bar = other.getBar(); - if (this$bar == null ? other$bar != null : !this$bar.equals(other$bar)) return false; - return true; - } - @java.lang.Override - @java.lang.SuppressWarnings("all") - public int hashCode() { - final int PRIME = 59; - int result = 1; - final java.lang.Object $foo = this.getFoo(); - result = result * PRIME + ($foo == null ? 43 : $foo.hashCode()); - final java.lang.Object $bar = this.getBar(); - result = result * PRIME + ($bar == null ? 43 : $bar.hashCode()); - return result; - } - @java.lang.Override - @java.lang.SuppressWarnings("all") - public java.lang.String toString() { - return "BuilderWithRecursiveGenericsWithSetterPrefix.Test(foo=" + this.getFoo() + ", bar=" + this.getBar() + ")"; - } - } -} diff --git a/test/transform/resource/after-delombok/BuilderWithToBuilder.java b/test/transform/resource/after-delombok/BuilderWithToBuilder.java index 4d5e64cc..396bcdb6 100644 --- a/test/transform/resource/after-delombok/BuilderWithToBuilder.java +++ b/test/transform/resource/after-delombok/BuilderWithToBuilder.java @@ -28,34 +28,34 @@ class BuilderWithToBuilder { BuilderWithToBuilderBuilder() { } @java.lang.SuppressWarnings("all") - public BuilderWithToBuilderBuilder one(final String one) { + public BuilderWithToBuilder.BuilderWithToBuilderBuilder one(final String one) { this.one = one; return this; } @java.lang.SuppressWarnings("all") - public BuilderWithToBuilderBuilder two(final String two) { + public BuilderWithToBuilder.BuilderWithToBuilderBuilder two(final String two) { this.two = two; return this; } @java.lang.SuppressWarnings("all") - public BuilderWithToBuilderBuilder foo(final T foo) { + public BuilderWithToBuilder.BuilderWithToBuilderBuilder foo(final T foo) { this.foo = foo; return this; } @java.lang.SuppressWarnings("all") - public BuilderWithToBuilderBuilder bar(final T bar) { + public BuilderWithToBuilder.BuilderWithToBuilderBuilder bar(final T bar) { if (this.bars == null) this.bars = new java.util.ArrayList(); this.bars.add(bar); return this; } @java.lang.SuppressWarnings("all") - public BuilderWithToBuilderBuilder bars(final java.util.Collection bars) { + public BuilderWithToBuilder.BuilderWithToBuilderBuilder bars(final java.util.Collection bars) { if (this.bars == null) this.bars = new java.util.ArrayList(); this.bars.addAll(bars); return this; } @java.lang.SuppressWarnings("all") - public BuilderWithToBuilderBuilder clearBars() { + public BuilderWithToBuilder.BuilderWithToBuilderBuilder clearBars() { if (this.bars != null) this.bars.clear(); return this; } @@ -81,12 +81,12 @@ class BuilderWithToBuilder { } } @java.lang.SuppressWarnings("all") - public static BuilderWithToBuilderBuilder builder() { - return new BuilderWithToBuilderBuilder(); + public static BuilderWithToBuilder.BuilderWithToBuilderBuilder builder() { + return new BuilderWithToBuilder.BuilderWithToBuilderBuilder(); } @java.lang.SuppressWarnings("all") - public BuilderWithToBuilderBuilder toBuilder() { - final BuilderWithToBuilderBuilder builder = new BuilderWithToBuilderBuilder().one(this.mOne).two(this.mTwo).foo(BuilderWithToBuilder.rrr(this)); + public BuilderWithToBuilder.BuilderWithToBuilderBuilder toBuilder() { + final BuilderWithToBuilder.BuilderWithToBuilderBuilder builder = new BuilderWithToBuilder.BuilderWithToBuilderBuilder().one(this.mOne).two(this.mTwo).foo(BuilderWithToBuilder.rrr(this)); if (this.bars != null) builder.bars(this.bars); return builder; } @@ -111,17 +111,17 @@ class ConstructorWithToBuilder { ConstructorWithToBuilderBuilder() { } @java.lang.SuppressWarnings("all") - public ConstructorWithToBuilderBuilder mOne(final String mOne) { + public ConstructorWithToBuilder.ConstructorWithToBuilderBuilder mOne(final String mOne) { this.mOne = mOne; return this; } @java.lang.SuppressWarnings("all") - public ConstructorWithToBuilderBuilder baz(final T baz) { + public ConstructorWithToBuilder.ConstructorWithToBuilderBuilder baz(final T baz) { this.baz = baz; return this; } @java.lang.SuppressWarnings("all") - public ConstructorWithToBuilderBuilder bars(final com.google.common.collect.ImmutableList bars) { + public ConstructorWithToBuilder.ConstructorWithToBuilderBuilder bars(final com.google.common.collect.ImmutableList bars) { this.bars = bars; return this; } @@ -136,11 +136,11 @@ class ConstructorWithToBuilder { } } @java.lang.SuppressWarnings("all") - public static ConstructorWithToBuilderBuilder builder() { - return new ConstructorWithToBuilderBuilder(); + public static ConstructorWithToBuilder.ConstructorWithToBuilderBuilder builder() { + return new ConstructorWithToBuilder.ConstructorWithToBuilderBuilder(); } @java.lang.SuppressWarnings("all") - public ConstructorWithToBuilderBuilder toBuilder() { - return new ConstructorWithToBuilderBuilder().mOne(this.mOne).baz(this.foo).bars(this.bars); + public ConstructorWithToBuilder.ConstructorWithToBuilderBuilder toBuilder() { + return new ConstructorWithToBuilder.ConstructorWithToBuilderBuilder().mOne(this.mOne).baz(this.foo).bars(this.bars); } } \ No newline at end of file diff --git a/test/transform/resource/after-delombok/BuilderWithToBuilderWithSetterPrefix.java b/test/transform/resource/after-delombok/BuilderWithToBuilderWithSetterPrefix.java deleted file mode 100644 index 322c667c..00000000 --- a/test/transform/resource/after-delombok/BuilderWithToBuilderWithSetterPrefix.java +++ /dev/null @@ -1,146 +0,0 @@ -import java.util.List; -class BuilderWithToBuilderWithSetterPrefix { - private String mOne; - private String mTwo; - private T foo; - private List bars; - public static K rrr(BuilderWithToBuilderWithSetterPrefix x) { - return x.foo; - } - @java.lang.SuppressWarnings("all") - BuilderWithToBuilderWithSetterPrefix(final String one, final String two, final T foo, final List bars) { - this.mOne = one; - this.mTwo = two; - this.foo = foo; - this.bars = bars; - } - @java.lang.SuppressWarnings("all") - public static class BuilderWithToBuilderWithSetterPrefixBuilder { - @java.lang.SuppressWarnings("all") - private String one; - @java.lang.SuppressWarnings("all") - private String two; - @java.lang.SuppressWarnings("all") - private T foo; - @java.lang.SuppressWarnings("all") - private java.util.ArrayList bars; - @java.lang.SuppressWarnings("all") - BuilderWithToBuilderWithSetterPrefixBuilder() { - } - @java.lang.SuppressWarnings("all") - public BuilderWithToBuilderWithSetterPrefixBuilder withOne(final String one) { - this.one = one; - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderWithToBuilderWithSetterPrefixBuilder withTwo(final String two) { - this.two = two; - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderWithToBuilderWithSetterPrefixBuilder withFoo(final T foo) { - this.foo = foo; - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderWithToBuilderWithSetterPrefixBuilder withBar(final T bar) { - if (this.bars == null) this.bars = new java.util.ArrayList(); - this.bars.add(bar); - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderWithToBuilderWithSetterPrefixBuilder withBars(final java.util.Collection bars) { - if (this.bars == null) this.bars = new java.util.ArrayList(); - this.bars.addAll(bars); - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderWithToBuilderWithSetterPrefixBuilder clearBars() { - if (this.bars != null) this.bars.clear(); - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderWithToBuilderWithSetterPrefix build() { - java.util.List bars; - switch (this.bars == null ? 0 : this.bars.size()) { - case 0: - bars = java.util.Collections.emptyList(); - break; - case 1: - bars = java.util.Collections.singletonList(this.bars.get(0)); - break; - default: - bars = java.util.Collections.unmodifiableList(new java.util.ArrayList(this.bars)); - } - return new BuilderWithToBuilderWithSetterPrefix(one, two, foo, bars); - } - @java.lang.Override - @java.lang.SuppressWarnings("all") - public java.lang.String toString() { - return "BuilderWithToBuilderWithSetterPrefix.BuilderWithToBuilderWithSetterPrefixBuilder(one=" + this.one + ", two=" + this.two + ", foo=" + this.foo + ", bars=" + this.bars + ")"; - } - } - @java.lang.SuppressWarnings("all") - public static BuilderWithToBuilderWithSetterPrefixBuilder builder() { - return new BuilderWithToBuilderWithSetterPrefixBuilder(); - } - @java.lang.SuppressWarnings("all") - public BuilderWithToBuilderWithSetterPrefixBuilder toBuilder() { - final BuilderWithToBuilderWithSetterPrefixBuilder builder = new BuilderWithToBuilderWithSetterPrefixBuilder().withOne(this.mOne).withTwo(this.mTwo).withFoo(BuilderWithToBuilderWithSetterPrefix.rrr(this)); - if (this.bars != null) builder.withBars(this.bars); - return builder; - } -} -class ConstructorWithToBuilderWithSetterPrefix { - private String mOne; - private String mTwo; - private T foo; - @lombok.Singular - private com.google.common.collect.ImmutableList bars; - public ConstructorWithToBuilderWithSetterPrefix(String mOne, T baz, com.google.common.collect.ImmutableList bars) { - } - @java.lang.SuppressWarnings("all") - public static class ConstructorWithToBuilderWithSetterPrefixBuilder { - @java.lang.SuppressWarnings("all") - private String mOne; - @java.lang.SuppressWarnings("all") - private T baz; - @java.lang.SuppressWarnings("all") - private com.google.common.collect.ImmutableList bars; - @java.lang.SuppressWarnings("all") - ConstructorWithToBuilderWithSetterPrefixBuilder() { - } - @java.lang.SuppressWarnings("all") - public ConstructorWithToBuilderWithSetterPrefixBuilder withMOne(final String mOne) { - this.mOne = mOne; - return this; - } - @java.lang.SuppressWarnings("all") - public ConstructorWithToBuilderWithSetterPrefixBuilder withBaz(final T baz) { - this.baz = baz; - return this; - } - @java.lang.SuppressWarnings("all") - public ConstructorWithToBuilderWithSetterPrefixBuilder withBars(final com.google.common.collect.ImmutableList bars) { - this.bars = bars; - return this; - } - @java.lang.SuppressWarnings("all") - public ConstructorWithToBuilderWithSetterPrefix build() { - return new ConstructorWithToBuilderWithSetterPrefix(mOne, baz, bars); - } - @java.lang.Override - @java.lang.SuppressWarnings("all") - public java.lang.String toString() { - return "ConstructorWithToBuilderWithSetterPrefix.ConstructorWithToBuilderWithSetterPrefixBuilder(mOne=" + this.mOne + ", baz=" + this.baz + ", bars=" + this.bars + ")"; - } - } - @java.lang.SuppressWarnings("all") - public static ConstructorWithToBuilderWithSetterPrefixBuilder builder() { - return new ConstructorWithToBuilderWithSetterPrefixBuilder(); - } - @java.lang.SuppressWarnings("all") - public ConstructorWithToBuilderWithSetterPrefixBuilder toBuilder() { - return new ConstructorWithToBuilderWithSetterPrefixBuilder().withMOne(this.mOne).withBaz(this.foo).withBars(this.bars); - } -} diff --git a/test/transform/resource/after-delombok/BuilderWithTolerate.java b/test/transform/resource/after-delombok/BuilderWithTolerate.java index 6ec7c091..0d1e04f7 100644 --- a/test/transform/resource/after-delombok/BuilderWithTolerate.java +++ b/test/transform/resource/after-delombok/BuilderWithTolerate.java @@ -15,7 +15,7 @@ public class BuilderWithTolerate { BuilderWithTolerateBuilder() { } @java.lang.SuppressWarnings("all") - public BuilderWithTolerateBuilder value(final int value) { + public BuilderWithTolerate.BuilderWithTolerateBuilder value(final int value) { this.value = value; return this; } @@ -34,7 +34,7 @@ public class BuilderWithTolerate { this.value = value; } @java.lang.SuppressWarnings("all") - public static BuilderWithTolerateBuilder builder() { - return new BuilderWithTolerateBuilder(); + public static BuilderWithTolerate.BuilderWithTolerateBuilder builder() { + return new BuilderWithTolerate.BuilderWithTolerateBuilder(); } } diff --git a/test/transform/resource/after-delombok/BuilderWithTolerateWithSetterPrefix.java b/test/transform/resource/after-delombok/BuilderWithTolerateWithSetterPrefix.java deleted file mode 100644 index 70394d09..00000000 --- a/test/transform/resource/after-delombok/BuilderWithTolerateWithSetterPrefix.java +++ /dev/null @@ -1,40 +0,0 @@ -import lombok.experimental.Tolerate; -public class BuilderWithTolerateWithSetterPrefix { - private final int value; - public static void main(String[] args) { - BuilderWithTolerateWithSetterPrefix.builder().withValue("42").build(); - } - public static class BuilderWithTolerateWithSetterPrefixBuilder { - @java.lang.SuppressWarnings("all") - private int value; - @Tolerate - public BuilderWithTolerateWithSetterPrefixBuilder withValue(String s) { - return this.withValue(Integer.parseInt(s)); - } - @java.lang.SuppressWarnings("all") - BuilderWithTolerateWithSetterPrefixBuilder() { - } - @java.lang.SuppressWarnings("all") - public BuilderWithTolerateWithSetterPrefixBuilder withValue(final int value) { - this.value = value; - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderWithTolerateWithSetterPrefix build() { - return new BuilderWithTolerateWithSetterPrefix(value); - } - @java.lang.Override - @java.lang.SuppressWarnings("all") - public java.lang.String toString() { - return "BuilderWithTolerateWithSetterPrefix.BuilderWithTolerateWithSetterPrefixBuilder(value=" + this.value + ")"; - } - } - @java.lang.SuppressWarnings("all") - BuilderWithTolerateWithSetterPrefix(final int value) { - this.value = value; - } - @java.lang.SuppressWarnings("all") - public static BuilderWithTolerateWithSetterPrefixBuilder builder() { - return new BuilderWithTolerateWithSetterPrefixBuilder(); - } -} diff --git a/test/transform/resource/after-delombok/CheckerFrameworkBuilder.java b/test/transform/resource/after-delombok/CheckerFrameworkBuilder.java index d21ad044..6db2fb73 100644 --- a/test/transform/resource/after-delombok/CheckerFrameworkBuilder.java +++ b/test/transform/resource/after-delombok/CheckerFrameworkBuilder.java @@ -35,46 +35,46 @@ class CheckerFrameworkBuilder { } @org.checkerframework.checker.builder.qual.ReturnsReceiver @java.lang.SuppressWarnings("all") - public CheckerFrameworkBuilderBuilder x(@org.checkerframework.checker.builder.qual.NotCalledMethods("x") CheckerFrameworkBuilderBuilder this, final int x) { + public CheckerFrameworkBuilder.CheckerFrameworkBuilderBuilder x(@org.checkerframework.checker.builder.qual.NotCalledMethods("x") CheckerFrameworkBuilder.CheckerFrameworkBuilderBuilder this, final int x) { this.x$value = x; x$set = true; return this; } @org.checkerframework.checker.builder.qual.ReturnsReceiver @java.lang.SuppressWarnings("all") - public CheckerFrameworkBuilderBuilder y(@org.checkerframework.checker.builder.qual.NotCalledMethods("y") CheckerFrameworkBuilderBuilder this, final int y) { + public CheckerFrameworkBuilder.CheckerFrameworkBuilderBuilder y(@org.checkerframework.checker.builder.qual.NotCalledMethods("y") CheckerFrameworkBuilder.CheckerFrameworkBuilderBuilder this, final int y) { this.y = y; return this; } @org.checkerframework.checker.builder.qual.ReturnsReceiver @java.lang.SuppressWarnings("all") - public CheckerFrameworkBuilderBuilder z(@org.checkerframework.checker.builder.qual.NotCalledMethods("z") CheckerFrameworkBuilderBuilder this, final int z) { + public CheckerFrameworkBuilder.CheckerFrameworkBuilderBuilder z(@org.checkerframework.checker.builder.qual.NotCalledMethods("z") CheckerFrameworkBuilder.CheckerFrameworkBuilderBuilder this, final int z) { this.z = z; return this; } @org.checkerframework.checker.builder.qual.ReturnsReceiver @java.lang.SuppressWarnings("all") - public CheckerFrameworkBuilderBuilder name(final String name) { + public CheckerFrameworkBuilder.CheckerFrameworkBuilderBuilder name(final String name) { if (this.names == null) this.names = new java.util.ArrayList(); this.names.add(name); return this; } @org.checkerframework.checker.builder.qual.ReturnsReceiver @java.lang.SuppressWarnings("all") - public CheckerFrameworkBuilderBuilder names(final java.util.Collection names) { + public CheckerFrameworkBuilder.CheckerFrameworkBuilderBuilder names(final java.util.Collection names) { if (this.names == null) this.names = new java.util.ArrayList(); this.names.addAll(names); return this; } @org.checkerframework.checker.builder.qual.ReturnsReceiver @java.lang.SuppressWarnings("all") - public CheckerFrameworkBuilderBuilder clearNames() { + public CheckerFrameworkBuilder.CheckerFrameworkBuilderBuilder clearNames() { if (this.names != null) this.names.clear(); return this; } @org.checkerframework.dataflow.qual.SideEffectFree @java.lang.SuppressWarnings("all") - public CheckerFrameworkBuilder build(@org.checkerframework.checker.builder.qual.CalledMethods({"y", "z"}) CheckerFrameworkBuilderBuilder this) { + public CheckerFrameworkBuilder build(@org.checkerframework.checker.builder.qual.CalledMethods({"y", "z"}) CheckerFrameworkBuilder.CheckerFrameworkBuilderBuilder this) { java.util.List names; switch (this.names == null ? 0 : this.names.size()) { case 0: @@ -100,7 +100,7 @@ class CheckerFrameworkBuilder { @org.checkerframework.common.aliasing.qual.Unique @org.checkerframework.dataflow.qual.SideEffectFree @java.lang.SuppressWarnings("all") - public static CheckerFrameworkBuilderBuilder builder() { - return new CheckerFrameworkBuilderBuilder(); + public static CheckerFrameworkBuilder.CheckerFrameworkBuilderBuilder builder() { + return new CheckerFrameworkBuilder.CheckerFrameworkBuilderBuilder(); } } diff --git a/test/transform/resource/after-delombok/CheckerFrameworkSuperBuilder.java b/test/transform/resource/after-delombok/CheckerFrameworkSuperBuilder.java index 40876369..31e8bdb5 100644 --- a/test/transform/resource/after-delombok/CheckerFrameworkSuperBuilder.java +++ b/test/transform/resource/after-delombok/CheckerFrameworkSuperBuilder.java @@ -11,7 +11,7 @@ class CheckerFrameworkSuperBuilder { return 5; } @java.lang.SuppressWarnings("all") - public static abstract class ParentBuilder> { + public static abstract class ParentBuilder> { @java.lang.SuppressWarnings("all") private boolean x$set; @java.lang.SuppressWarnings("all") @@ -28,23 +28,23 @@ class CheckerFrameworkSuperBuilder { protected abstract B self(); @org.checkerframework.dataflow.qual.SideEffectFree @java.lang.SuppressWarnings("all") - public abstract C build(@org.checkerframework.checker.builder.qual.CalledMethods({"y", "z"}) Parent this); + public abstract C build(@org.checkerframework.checker.builder.qual.CalledMethods({"y", "z"}) CheckerFrameworkSuperBuilder.Parent this); @org.checkerframework.checker.builder.qual.ReturnsReceiver @java.lang.SuppressWarnings("all") - public B x(@org.checkerframework.checker.builder.qual.NotCalledMethods("x") ParentBuilder this, final int x) { + public B x(@org.checkerframework.checker.builder.qual.NotCalledMethods("x") CheckerFrameworkSuperBuilder.Parent.ParentBuilder this, final int x) { this.x$value = x; x$set = true; return self(); } @org.checkerframework.checker.builder.qual.ReturnsReceiver @java.lang.SuppressWarnings("all") - public B y(@org.checkerframework.checker.builder.qual.NotCalledMethods("y") ParentBuilder this, final int y) { + public B y(@org.checkerframework.checker.builder.qual.NotCalledMethods("y") CheckerFrameworkSuperBuilder.Parent.ParentBuilder this, final int y) { this.y = y; return self(); } @org.checkerframework.checker.builder.qual.ReturnsReceiver @java.lang.SuppressWarnings("all") - public B z(@org.checkerframework.checker.builder.qual.NotCalledMethods("z") ParentBuilder this, final int z) { + public B z(@org.checkerframework.checker.builder.qual.NotCalledMethods("z") CheckerFrameworkSuperBuilder.Parent.ParentBuilder this, final int z) { this.z = z; return self(); } @@ -76,7 +76,7 @@ class CheckerFrameworkSuperBuilder { } } @java.lang.SuppressWarnings("all") - private static final class ParentBuilderImpl extends ParentBuilder { + private static final class ParentBuilderImpl extends CheckerFrameworkSuperBuilder.Parent.ParentBuilder { @org.checkerframework.common.aliasing.qual.Unique @java.lang.SuppressWarnings("all") private ParentBuilderImpl() { @@ -85,21 +85,21 @@ class CheckerFrameworkSuperBuilder { @org.checkerframework.checker.builder.qual.ReturnsReceiver @org.checkerframework.dataflow.qual.SideEffectFree @java.lang.SuppressWarnings("all") - protected ParentBuilderImpl self() { + protected CheckerFrameworkSuperBuilder.Parent.ParentBuilderImpl self() { return this; } @org.checkerframework.dataflow.qual.SideEffectFree @java.lang.Override @java.lang.SuppressWarnings("all") - public Parent build(@org.checkerframework.checker.builder.qual.CalledMethods({"y", "z"}) ParentBuilderImpl this) { - return new Parent(this); + public CheckerFrameworkSuperBuilder.Parent build(@org.checkerframework.checker.builder.qual.CalledMethods({"y", "z"}) CheckerFrameworkSuperBuilder.Parent.ParentBuilderImpl this) { + return new CheckerFrameworkSuperBuilder.Parent(this); } } @org.checkerframework.dataflow.qual.SideEffectFree @java.lang.SuppressWarnings("all") - protected Parent(final ParentBuilder b) { + protected Parent(final CheckerFrameworkSuperBuilder.Parent.ParentBuilder b) { if (b.x$set) this.x = b.x$value; - else this.x = Parent.$default$x(); + else this.x = CheckerFrameworkSuperBuilder.Parent.$default$x(); this.y = b.y; this.z = b.z; java.util.List names; @@ -117,8 +117,8 @@ class CheckerFrameworkSuperBuilder { } @org.checkerframework.dataflow.qual.SideEffectFree @java.lang.SuppressWarnings("all") - public static ParentBuilder builder() { - return new ParentBuilderImpl(); + public static CheckerFrameworkSuperBuilder.Parent.ParentBuilder builder() { + return new CheckerFrameworkSuperBuilder.Parent.ParentBuilderImpl(); } } public static class Child extends Parent { @@ -129,7 +129,7 @@ class CheckerFrameworkSuperBuilder { return 1; } @java.lang.SuppressWarnings("all") - public static abstract class ChildBuilder> extends Parent.ParentBuilder { + public static abstract class ChildBuilder> extends Parent.ParentBuilder { @java.lang.SuppressWarnings("all") private boolean a$set; @java.lang.SuppressWarnings("all") @@ -144,17 +144,17 @@ class CheckerFrameworkSuperBuilder { @org.checkerframework.dataflow.qual.SideEffectFree @java.lang.Override @java.lang.SuppressWarnings("all") - public abstract C build(@org.checkerframework.checker.builder.qual.CalledMethods("b") Child this); + public abstract C build(@org.checkerframework.checker.builder.qual.CalledMethods("b") CheckerFrameworkSuperBuilder.Child this); @org.checkerframework.checker.builder.qual.ReturnsReceiver @java.lang.SuppressWarnings("all") - public B a(@org.checkerframework.checker.builder.qual.NotCalledMethods("a") ChildBuilder this, final int a) { + public B a(@org.checkerframework.checker.builder.qual.NotCalledMethods("a") CheckerFrameworkSuperBuilder.Child.ChildBuilder this, final int a) { this.a$value = a; a$set = true; return self(); } @org.checkerframework.checker.builder.qual.ReturnsReceiver @java.lang.SuppressWarnings("all") - public B b(@org.checkerframework.checker.builder.qual.NotCalledMethods("b") ChildBuilder this, final int b) { + public B b(@org.checkerframework.checker.builder.qual.NotCalledMethods("b") CheckerFrameworkSuperBuilder.Child.ChildBuilder this, final int b) { this.b = b; return self(); } @@ -166,7 +166,7 @@ class CheckerFrameworkSuperBuilder { } } @java.lang.SuppressWarnings("all") - private static final class ChildBuilderImpl extends ChildBuilder { + private static final class ChildBuilderImpl extends CheckerFrameworkSuperBuilder.Child.ChildBuilder { @org.checkerframework.common.aliasing.qual.Unique @java.lang.SuppressWarnings("all") private ChildBuilderImpl() { @@ -175,28 +175,28 @@ class CheckerFrameworkSuperBuilder { @org.checkerframework.checker.builder.qual.ReturnsReceiver @org.checkerframework.dataflow.qual.SideEffectFree @java.lang.SuppressWarnings("all") - protected ChildBuilderImpl self() { + protected CheckerFrameworkSuperBuilder.Child.ChildBuilderImpl self() { return this; } @org.checkerframework.dataflow.qual.SideEffectFree @java.lang.Override @java.lang.SuppressWarnings("all") - public Child build(@org.checkerframework.checker.builder.qual.CalledMethods("b") ChildBuilderImpl this) { - return new Child(this); + public CheckerFrameworkSuperBuilder.Child build(@org.checkerframework.checker.builder.qual.CalledMethods("b") CheckerFrameworkSuperBuilder.Child.ChildBuilderImpl this) { + return new CheckerFrameworkSuperBuilder.Child(this); } } @org.checkerframework.dataflow.qual.SideEffectFree @java.lang.SuppressWarnings("all") - protected Child(final ChildBuilder b) { + protected Child(final CheckerFrameworkSuperBuilder.Child.ChildBuilder b) { super(b); if (b.a$set) this.a = b.a$value; - else this.a = Child.$default$a(); + else this.a = CheckerFrameworkSuperBuilder.Child.$default$a(); this.b = b.b; } @org.checkerframework.dataflow.qual.SideEffectFree @java.lang.SuppressWarnings("all") - public static ChildBuilder builder() { - return new ChildBuilderImpl(); + public static CheckerFrameworkSuperBuilder.Child.ChildBuilder builder() { + return new CheckerFrameworkSuperBuilder.Child.ChildBuilderImpl(); } } } \ No newline at end of file diff --git a/test/transform/resource/after-delombok/ConstructorsWithBuilderDefaults.java b/test/transform/resource/after-delombok/ConstructorsWithBuilderDefaults.java index f37c68af..19acf170 100644 --- a/test/transform/resource/after-delombok/ConstructorsWithBuilderDefaults.java +++ b/test/transform/resource/after-delombok/ConstructorsWithBuilderDefaults.java @@ -17,13 +17,13 @@ final class ConstructorsWithBuilderDefaults { ConstructorsWithBuilderDefaultsBuilder() { } @java.lang.SuppressWarnings("all") - public ConstructorsWithBuilderDefaultsBuilder x(final int x) { + public ConstructorsWithBuilderDefaults.ConstructorsWithBuilderDefaultsBuilder x(final int x) { this.x$value = x; x$set = true; return this; } @java.lang.SuppressWarnings("all") - public ConstructorsWithBuilderDefaultsBuilder y(final int y) { + public ConstructorsWithBuilderDefaults.ConstructorsWithBuilderDefaultsBuilder y(final int y) { this.y = y; return this; } @@ -40,8 +40,8 @@ final class ConstructorsWithBuilderDefaults { } } @java.lang.SuppressWarnings("all") - public static ConstructorsWithBuilderDefaultsBuilder builder() { - return new ConstructorsWithBuilderDefaultsBuilder(); + public static ConstructorsWithBuilderDefaults.ConstructorsWithBuilderDefaultsBuilder builder() { + return new ConstructorsWithBuilderDefaults.ConstructorsWithBuilderDefaultsBuilder(); } @java.lang.SuppressWarnings("all") public int getX() { diff --git a/test/transform/resource/after-delombok/ConstructorsWithBuilderDefaults2.java b/test/transform/resource/after-delombok/ConstructorsWithBuilderDefaults2.java index 7816b0c8..17763f3f 100644 --- a/test/transform/resource/after-delombok/ConstructorsWithBuilderDefaults2.java +++ b/test/transform/resource/after-delombok/ConstructorsWithBuilderDefaults2.java @@ -34,19 +34,19 @@ final class ConstructorsWithBuilderDefaults { ConstructorsWithBuilderDefaultsBuilder() { } @java.lang.SuppressWarnings("all") - public ConstructorsWithBuilderDefaultsBuilder z(final java.util.List z) { + public ConstructorsWithBuilderDefaults.ConstructorsWithBuilderDefaultsBuilder z(final java.util.List z) { this.z$value = z; z$set = true; return this; } @java.lang.SuppressWarnings("all") - public ConstructorsWithBuilderDefaultsBuilder x(final T x) { + public ConstructorsWithBuilderDefaults.ConstructorsWithBuilderDefaultsBuilder x(final T x) { this.x$value = x; x$set = true; return this; } @java.lang.SuppressWarnings("all") - public ConstructorsWithBuilderDefaultsBuilder q(final T q) { + public ConstructorsWithBuilderDefaults.ConstructorsWithBuilderDefaultsBuilder q(final T q) { this.q = q; return this; } @@ -66,8 +66,8 @@ final class ConstructorsWithBuilderDefaults { } } @java.lang.SuppressWarnings("all") - public static ConstructorsWithBuilderDefaultsBuilder builder() { - return new ConstructorsWithBuilderDefaultsBuilder(); + public static ConstructorsWithBuilderDefaults.ConstructorsWithBuilderDefaultsBuilder builder() { + return new ConstructorsWithBuilderDefaults.ConstructorsWithBuilderDefaultsBuilder(); } @java.lang.SuppressWarnings("all") private ConstructorsWithBuilderDefaults() { diff --git a/test/transform/resource/after-delombok/JacksonJsonProperty.java b/test/transform/resource/after-delombok/JacksonJsonProperty.java index 16a8039e..500871b2 100644 --- a/test/transform/resource/after-delombok/JacksonJsonProperty.java +++ b/test/transform/resource/after-delombok/JacksonJsonProperty.java @@ -19,7 +19,7 @@ public class JacksonJsonProperty { @JsonProperty("kebab-case-prop") @JsonSetter(nulls = Nulls.SKIP) @java.lang.SuppressWarnings("all") - public JacksonJsonPropertyBuilder kebabCaseProp(final String kebabCaseProp) { + public JacksonJsonProperty.JacksonJsonPropertyBuilder kebabCaseProp(final String kebabCaseProp) { this.kebabCaseProp = kebabCaseProp; return this; } @@ -34,8 +34,8 @@ public class JacksonJsonProperty { } } @java.lang.SuppressWarnings("all") - public static JacksonJsonPropertyBuilder builder() { - return new JacksonJsonPropertyBuilder(); + public static JacksonJsonProperty.JacksonJsonPropertyBuilder builder() { + return new JacksonJsonProperty.JacksonJsonPropertyBuilder(); } @JsonProperty("kebab-case-prop") @JsonSetter(nulls = Nulls.SKIP) diff --git a/test/transform/resource/after-delombok/SuperBuilderAbstract.java b/test/transform/resource/after-delombok/SuperBuilderAbstract.java index d1e82c27..a5825bf4 100644 --- a/test/transform/resource/after-delombok/SuperBuilderAbstract.java +++ b/test/transform/resource/after-delombok/SuperBuilderAbstract.java @@ -2,7 +2,7 @@ public class SuperBuilderAbstract { public static class Parent { int parentField; @java.lang.SuppressWarnings("all") - public static abstract class ParentBuilder> { + public static abstract class ParentBuilder> { @java.lang.SuppressWarnings("all") private int parentField; @java.lang.SuppressWarnings("all") @@ -21,34 +21,34 @@ public class SuperBuilderAbstract { } } @java.lang.SuppressWarnings("all") - private static final class ParentBuilderImpl extends ParentBuilder { + private static final class ParentBuilderImpl extends SuperBuilderAbstract.Parent.ParentBuilder { @java.lang.SuppressWarnings("all") private ParentBuilderImpl() { } @java.lang.Override @java.lang.SuppressWarnings("all") - protected ParentBuilderImpl self() { + protected SuperBuilderAbstract.Parent.ParentBuilderImpl self() { return this; } @java.lang.Override @java.lang.SuppressWarnings("all") - public Parent build() { - return new Parent(this); + public SuperBuilderAbstract.Parent build() { + return new SuperBuilderAbstract.Parent(this); } } @java.lang.SuppressWarnings("all") - protected Parent(final ParentBuilder b) { + protected Parent(final SuperBuilderAbstract.Parent.ParentBuilder b) { this.parentField = b.parentField; } @java.lang.SuppressWarnings("all") - public static ParentBuilder builder() { - return new ParentBuilderImpl(); + public static SuperBuilderAbstract.Parent.ParentBuilder builder() { + return new SuperBuilderAbstract.Parent.ParentBuilderImpl(); } } public static abstract class Child extends Parent { double childField; @java.lang.SuppressWarnings("all") - public static abstract class ChildBuilder> extends Parent.ParentBuilder { + public static abstract class ChildBuilder> extends Parent.ParentBuilder { @java.lang.SuppressWarnings("all") private double childField; @java.lang.Override @@ -69,7 +69,7 @@ public class SuperBuilderAbstract { } } @java.lang.SuppressWarnings("all") - protected Child(final ChildBuilder b) { + protected Child(final SuperBuilderAbstract.Child.ChildBuilder b) { super(b); this.childField = b.childField; } @@ -77,7 +77,7 @@ public class SuperBuilderAbstract { public static class GrandChild extends Child { String grandChildField; @java.lang.SuppressWarnings("all") - public static abstract class GrandChildBuilder> extends Child.ChildBuilder { + public static abstract class GrandChildBuilder> extends Child.ChildBuilder { @java.lang.SuppressWarnings("all") private String grandChildField; @java.lang.Override @@ -98,29 +98,29 @@ public class SuperBuilderAbstract { } } @java.lang.SuppressWarnings("all") - private static final class GrandChildBuilderImpl extends GrandChildBuilder { + private static final class GrandChildBuilderImpl extends SuperBuilderAbstract.GrandChild.GrandChildBuilder { @java.lang.SuppressWarnings("all") private GrandChildBuilderImpl() { } @java.lang.Override @java.lang.SuppressWarnings("all") - protected GrandChildBuilderImpl self() { + protected SuperBuilderAbstract.GrandChild.GrandChildBuilderImpl self() { return this; } @java.lang.Override @java.lang.SuppressWarnings("all") - public GrandChild build() { - return new GrandChild(this); + public SuperBuilderAbstract.GrandChild build() { + return new SuperBuilderAbstract.GrandChild(this); } } @java.lang.SuppressWarnings("all") - protected GrandChild(final GrandChildBuilder b) { + protected GrandChild(final SuperBuilderAbstract.GrandChild.GrandChildBuilder b) { super(b); this.grandChildField = b.grandChildField; } @java.lang.SuppressWarnings("all") - public static GrandChildBuilder builder() { - return new GrandChildBuilderImpl(); + public static SuperBuilderAbstract.GrandChild.GrandChildBuilder builder() { + return new SuperBuilderAbstract.GrandChild.GrandChildBuilderImpl(); } } public static void test() { diff --git a/test/transform/resource/after-delombok/SuperBuilderAbstractToBuilder.java b/test/transform/resource/after-delombok/SuperBuilderAbstractToBuilder.java index 096bd533..aef3976f 100644 --- a/test/transform/resource/after-delombok/SuperBuilderAbstractToBuilder.java +++ b/test/transform/resource/after-delombok/SuperBuilderAbstractToBuilder.java @@ -2,16 +2,16 @@ public class SuperBuilderAbstractToBuilder { public static class Parent { int parentField; @java.lang.SuppressWarnings("all") - public static abstract class ParentBuilder> { + public static abstract class ParentBuilder> { @java.lang.SuppressWarnings("all") private int parentField; @java.lang.SuppressWarnings("all") protected B $fillValuesFrom(final C instance) { - ParentBuilder.$fillValuesFromInstanceIntoBuilder(instance, this); + SuperBuilderAbstractToBuilder.Parent.ParentBuilder.$fillValuesFromInstanceIntoBuilder(instance, this); return self(); } @java.lang.SuppressWarnings("all") - private static void $fillValuesFromInstanceIntoBuilder(final Parent instance, final ParentBuilder b) { + private static void $fillValuesFromInstanceIntoBuilder(final SuperBuilderAbstractToBuilder.Parent instance, final SuperBuilderAbstractToBuilder.Parent.ParentBuilder b) { b.parentField(instance.parentField); } @java.lang.SuppressWarnings("all") @@ -30,49 +30,49 @@ public class SuperBuilderAbstractToBuilder { } } @java.lang.SuppressWarnings("all") - private static final class ParentBuilderImpl extends ParentBuilder { + private static final class ParentBuilderImpl extends SuperBuilderAbstractToBuilder.Parent.ParentBuilder { @java.lang.SuppressWarnings("all") private ParentBuilderImpl() { } @java.lang.Override @java.lang.SuppressWarnings("all") - protected ParentBuilderImpl self() { + protected SuperBuilderAbstractToBuilder.Parent.ParentBuilderImpl self() { return this; } @java.lang.Override @java.lang.SuppressWarnings("all") - public Parent build() { - return new Parent(this); + public SuperBuilderAbstractToBuilder.Parent build() { + return new SuperBuilderAbstractToBuilder.Parent(this); } } @java.lang.SuppressWarnings("all") - protected Parent(final ParentBuilder b) { + protected Parent(final SuperBuilderAbstractToBuilder.Parent.ParentBuilder b) { this.parentField = b.parentField; } @java.lang.SuppressWarnings("all") - public static ParentBuilder builder() { - return new ParentBuilderImpl(); + public static SuperBuilderAbstractToBuilder.Parent.ParentBuilder builder() { + return new SuperBuilderAbstractToBuilder.Parent.ParentBuilderImpl(); } @java.lang.SuppressWarnings("all") - public ParentBuilder toBuilder() { - return new ParentBuilderImpl().$fillValuesFrom(this); + public SuperBuilderAbstractToBuilder.Parent.ParentBuilder toBuilder() { + return new SuperBuilderAbstractToBuilder.Parent.ParentBuilderImpl().$fillValuesFrom(this); } } public static abstract class Child extends Parent { double childField; @java.lang.SuppressWarnings("all") - public static abstract class ChildBuilder> extends Parent.ParentBuilder { + public static abstract class ChildBuilder> extends Parent.ParentBuilder { @java.lang.SuppressWarnings("all") private double childField; @java.lang.Override @java.lang.SuppressWarnings("all") protected B $fillValuesFrom(final C instance) { super.$fillValuesFrom(instance); - ChildBuilder.$fillValuesFromInstanceIntoBuilder(instance, this); + SuperBuilderAbstractToBuilder.Child.ChildBuilder.$fillValuesFromInstanceIntoBuilder(instance, this); return self(); } @java.lang.SuppressWarnings("all") - private static void $fillValuesFromInstanceIntoBuilder(final Child instance, final ChildBuilder b) { + private static void $fillValuesFromInstanceIntoBuilder(final SuperBuilderAbstractToBuilder.Child instance, final SuperBuilderAbstractToBuilder.Child.ChildBuilder b) { b.childField(instance.childField); } @java.lang.Override @@ -93,7 +93,7 @@ public class SuperBuilderAbstractToBuilder { } } @java.lang.SuppressWarnings("all") - protected Child(final ChildBuilder b) { + protected Child(final SuperBuilderAbstractToBuilder.Child.ChildBuilder b) { super(b); this.childField = b.childField; } @@ -101,18 +101,18 @@ public class SuperBuilderAbstractToBuilder { public static class GrandChild extends Child { String grandChildField; @java.lang.SuppressWarnings("all") - public static abstract class GrandChildBuilder> extends Child.ChildBuilder { + public static abstract class GrandChildBuilder> extends Child.ChildBuilder { @java.lang.SuppressWarnings("all") private String grandChildField; @java.lang.Override @java.lang.SuppressWarnings("all") protected B $fillValuesFrom(final C instance) { super.$fillValuesFrom(instance); - GrandChildBuilder.$fillValuesFromInstanceIntoBuilder(instance, this); + SuperBuilderAbstractToBuilder.GrandChild.GrandChildBuilder.$fillValuesFromInstanceIntoBuilder(instance, this); return self(); } @java.lang.SuppressWarnings("all") - private static void $fillValuesFromInstanceIntoBuilder(final GrandChild instance, final GrandChildBuilder b) { + private static void $fillValuesFromInstanceIntoBuilder(final SuperBuilderAbstractToBuilder.GrandChild instance, final SuperBuilderAbstractToBuilder.GrandChild.GrandChildBuilder b) { b.grandChildField(instance.grandChildField); } @java.lang.Override @@ -133,33 +133,33 @@ public class SuperBuilderAbstractToBuilder { } } @java.lang.SuppressWarnings("all") - private static final class GrandChildBuilderImpl extends GrandChildBuilder { + private static final class GrandChildBuilderImpl extends SuperBuilderAbstractToBuilder.GrandChild.GrandChildBuilder { @java.lang.SuppressWarnings("all") private GrandChildBuilderImpl() { } @java.lang.Override @java.lang.SuppressWarnings("all") - protected GrandChildBuilderImpl self() { + protected SuperBuilderAbstractToBuilder.GrandChild.GrandChildBuilderImpl self() { return this; } @java.lang.Override @java.lang.SuppressWarnings("all") - public GrandChild build() { - return new GrandChild(this); + public SuperBuilderAbstractToBuilder.GrandChild build() { + return new SuperBuilderAbstractToBuilder.GrandChild(this); } } @java.lang.SuppressWarnings("all") - protected GrandChild(final GrandChildBuilder b) { + protected GrandChild(final SuperBuilderAbstractToBuilder.GrandChild.GrandChildBuilder b) { super(b); this.grandChildField = b.grandChildField; } @java.lang.SuppressWarnings("all") - public static GrandChildBuilder builder() { - return new GrandChildBuilderImpl(); + public static SuperBuilderAbstractToBuilder.GrandChild.GrandChildBuilder builder() { + return new SuperBuilderAbstractToBuilder.GrandChild.GrandChildBuilderImpl(); } @java.lang.SuppressWarnings("all") - public GrandChildBuilder toBuilder() { - return new GrandChildBuilderImpl().$fillValuesFrom(this); + public SuperBuilderAbstractToBuilder.GrandChild.GrandChildBuilder toBuilder() { + return new SuperBuilderAbstractToBuilder.GrandChild.GrandChildBuilderImpl().$fillValuesFrom(this); } } public static void test() { diff --git a/test/transform/resource/after-delombok/SuperBuilderBasic.java b/test/transform/resource/after-delombok/SuperBuilderBasic.java index 18a98af3..ef8df1cc 100644 --- a/test/transform/resource/after-delombok/SuperBuilderBasic.java +++ b/test/transform/resource/after-delombok/SuperBuilderBasic.java @@ -4,7 +4,7 @@ public class SuperBuilderBasic { int field1; List items; @java.lang.SuppressWarnings("all") - public static abstract class ParentBuilder> { + public static abstract class ParentBuilder> { @java.lang.SuppressWarnings("all") private int field1; @java.lang.SuppressWarnings("all") @@ -42,23 +42,23 @@ public class SuperBuilderBasic { } } @java.lang.SuppressWarnings("all") - private static final class ParentBuilderImpl extends ParentBuilder { + private static final class ParentBuilderImpl extends SuperBuilderBasic.Parent.ParentBuilder { @java.lang.SuppressWarnings("all") private ParentBuilderImpl() { } @java.lang.Override @java.lang.SuppressWarnings("all") - protected ParentBuilderImpl self() { + protected SuperBuilderBasic.Parent.ParentBuilderImpl self() { return this; } @java.lang.Override @java.lang.SuppressWarnings("all") - public Parent build() { - return new Parent(this); + public SuperBuilderBasic.Parent build() { + return new SuperBuilderBasic.Parent(this); } } @java.lang.SuppressWarnings("all") - protected Parent(final ParentBuilder b) { + protected Parent(final SuperBuilderBasic.Parent.ParentBuilder b) { this.field1 = b.field1; java.util.List items; switch (b.items == null ? 0 : b.items.size()) { @@ -74,14 +74,14 @@ public class SuperBuilderBasic { this.items = items; } @java.lang.SuppressWarnings("all") - public static ParentBuilder builder() { - return new ParentBuilderImpl(); + public static SuperBuilderBasic.Parent.ParentBuilder builder() { + return new SuperBuilderBasic.Parent.ParentBuilderImpl(); } } public static class Child extends Parent { double field3; @java.lang.SuppressWarnings("all") - public static abstract class ChildBuilder> extends Parent.ParentBuilder { + public static abstract class ChildBuilder> extends Parent.ParentBuilder { @java.lang.SuppressWarnings("all") private double field3; @java.lang.Override @@ -102,29 +102,29 @@ public class SuperBuilderBasic { } } @java.lang.SuppressWarnings("all") - private static final class ChildBuilderImpl extends ChildBuilder { + private static final class ChildBuilderImpl extends SuperBuilderBasic.Child.ChildBuilder { @java.lang.SuppressWarnings("all") private ChildBuilderImpl() { } @java.lang.Override @java.lang.SuppressWarnings("all") - protected ChildBuilderImpl self() { + protected SuperBuilderBasic.Child.ChildBuilderImpl self() { return this; } @java.lang.Override @java.lang.SuppressWarnings("all") - public Child build() { - return new Child(this); + public SuperBuilderBasic.Child build() { + return new SuperBuilderBasic.Child(this); } } @java.lang.SuppressWarnings("all") - protected Child(final ChildBuilder b) { + protected Child(final SuperBuilderBasic.Child.ChildBuilder b) { super(b); this.field3 = b.field3; } @java.lang.SuppressWarnings("all") - public static ChildBuilder builder() { - return new ChildBuilderImpl(); + public static SuperBuilderBasic.Child.ChildBuilder builder() { + return new SuperBuilderBasic.Child.ChildBuilderImpl(); } } public static void test() { diff --git a/test/transform/resource/after-delombok/SuperBuilderBasicToBuilder.java b/test/transform/resource/after-delombok/SuperBuilderBasicToBuilder.java index dc0b4e70..e9e8774a 100644 --- a/test/transform/resource/after-delombok/SuperBuilderBasicToBuilder.java +++ b/test/transform/resource/after-delombok/SuperBuilderBasicToBuilder.java @@ -13,7 +13,7 @@ public class SuperBuilderBasicToBuilder { return "staticMethod"; } @java.lang.SuppressWarnings("all") - public static abstract class ParentBuilder> { + public static abstract class ParentBuilder> { @java.lang.SuppressWarnings("all") private int field1; @java.lang.SuppressWarnings("all") @@ -26,15 +26,15 @@ public class SuperBuilderBasicToBuilder { private java.util.ArrayList items; @java.lang.SuppressWarnings("all") protected B $fillValuesFrom(final C instance) { - ParentBuilder.$fillValuesFromInstanceIntoBuilder(instance, this); + SuperBuilderBasicToBuilder.Parent.ParentBuilder.$fillValuesFromInstanceIntoBuilder(instance, this); return self(); } @java.lang.SuppressWarnings("all") - private static void $fillValuesFromInstanceIntoBuilder(final Parent instance, final ParentBuilder b) { + private static void $fillValuesFromInstanceIntoBuilder(final SuperBuilderBasicToBuilder.Parent instance, final SuperBuilderBasicToBuilder.Parent.ParentBuilder b) { b.field1(instance.field1); b.obtainViaField(instance.field1); b.obtainViaMethod(instance.method()); - b.obtainViaStaticMethod(Parent.staticMethod(instance)); + b.obtainViaStaticMethod(SuperBuilderBasicToBuilder.Parent.staticMethod(instance)); b.items(instance.items == null ? java.util.Collections.emptyList() : instance.items); } @java.lang.SuppressWarnings("all") @@ -85,23 +85,23 @@ public class SuperBuilderBasicToBuilder { } } @java.lang.SuppressWarnings("all") - private static final class ParentBuilderImpl extends ParentBuilder { + private static final class ParentBuilderImpl extends SuperBuilderBasicToBuilder.Parent.ParentBuilder { @java.lang.SuppressWarnings("all") private ParentBuilderImpl() { } @java.lang.Override @java.lang.SuppressWarnings("all") - protected ParentBuilderImpl self() { + protected SuperBuilderBasicToBuilder.Parent.ParentBuilderImpl self() { return this; } @java.lang.Override @java.lang.SuppressWarnings("all") - public Parent build() { - return new Parent(this); + public SuperBuilderBasicToBuilder.Parent build() { + return new SuperBuilderBasicToBuilder.Parent(this); } } @java.lang.SuppressWarnings("all") - protected Parent(final ParentBuilder b) { + protected Parent(final SuperBuilderBasicToBuilder.Parent.ParentBuilder b) { this.field1 = b.field1; this.obtainViaField = b.obtainViaField; this.obtainViaMethod = b.obtainViaMethod; @@ -120,29 +120,29 @@ public class SuperBuilderBasicToBuilder { this.items = items; } @java.lang.SuppressWarnings("all") - public static ParentBuilder builder() { - return new ParentBuilderImpl(); + public static SuperBuilderBasicToBuilder.Parent.ParentBuilder builder() { + return new SuperBuilderBasicToBuilder.Parent.ParentBuilderImpl(); } @java.lang.SuppressWarnings("all") - public ParentBuilder toBuilder() { - return new ParentBuilderImpl().$fillValuesFrom(this); + public SuperBuilderBasicToBuilder.Parent.ParentBuilder toBuilder() { + return new SuperBuilderBasicToBuilder.Parent.ParentBuilderImpl().$fillValuesFrom(this); } } public static class Child extends Parent { private double field3; @java.lang.SuppressWarnings("all") - public static abstract class ChildBuilder> extends Parent.ParentBuilder { + public static abstract class ChildBuilder> extends Parent.ParentBuilder { @java.lang.SuppressWarnings("all") private double field3; @java.lang.Override @java.lang.SuppressWarnings("all") protected B $fillValuesFrom(final C instance) { super.$fillValuesFrom(instance); - ChildBuilder.$fillValuesFromInstanceIntoBuilder(instance, this); + SuperBuilderBasicToBuilder.Child.ChildBuilder.$fillValuesFromInstanceIntoBuilder(instance, this); return self(); } @java.lang.SuppressWarnings("all") - private static void $fillValuesFromInstanceIntoBuilder(final Child instance, final ChildBuilder b) { + private static void $fillValuesFromInstanceIntoBuilder(final SuperBuilderBasicToBuilder.Child instance, final SuperBuilderBasicToBuilder.Child.ChildBuilder b) { b.field3(instance.field3); } @java.lang.Override @@ -163,33 +163,33 @@ public class SuperBuilderBasicToBuilder { } } @java.lang.SuppressWarnings("all") - private static final class ChildBuilderImpl extends ChildBuilder { + private static final class ChildBuilderImpl extends SuperBuilderBasicToBuilder.Child.ChildBuilder { @java.lang.SuppressWarnings("all") private ChildBuilderImpl() { } @java.lang.Override @java.lang.SuppressWarnings("all") - protected ChildBuilderImpl self() { + protected SuperBuilderBasicToBuilder.Child.ChildBuilderImpl self() { return this; } @java.lang.Override @java.lang.SuppressWarnings("all") - public Child build() { - return new Child(this); + public SuperBuilderBasicToBuilder.Child build() { + return new SuperBuilderBasicToBuilder.Child(this); } } @java.lang.SuppressWarnings("all") - protected Child(final ChildBuilder b) { + protected Child(final SuperBuilderBasicToBuilder.Child.ChildBuilder b) { super(b); this.field3 = b.field3; } @java.lang.SuppressWarnings("all") - public static ChildBuilder builder() { - return new ChildBuilderImpl(); + public static SuperBuilderBasicToBuilder.Child.ChildBuilder builder() { + return new SuperBuilderBasicToBuilder.Child.ChildBuilderImpl(); } @java.lang.SuppressWarnings("all") - public ChildBuilder toBuilder() { - return new ChildBuilderImpl().$fillValuesFrom(this); + public SuperBuilderBasicToBuilder.Child.ChildBuilder toBuilder() { + return new SuperBuilderBasicToBuilder.Child.ChildBuilderImpl().$fillValuesFrom(this); } } public static void test() { diff --git a/test/transform/resource/after-delombok/SuperBuilderCustomized.java b/test/transform/resource/after-delombok/SuperBuilderCustomized.java index dcc2613f..e8f95407 100644 --- a/test/transform/resource/after-delombok/SuperBuilderCustomized.java +++ b/test/transform/resource/after-delombok/SuperBuilderCustomized.java @@ -25,28 +25,28 @@ public class SuperBuilderCustomized { } int field1; @java.lang.SuppressWarnings("all") - private static final class ParentBuilderImpl extends ParentBuilder { + private static final class ParentBuilderImpl extends SuperBuilderCustomized.Parent.ParentBuilder { @java.lang.SuppressWarnings("all") private ParentBuilderImpl() { } @java.lang.Override @java.lang.SuppressWarnings("all") - protected ParentBuilderImpl self() { + protected SuperBuilderCustomized.Parent.ParentBuilderImpl self() { return this; } @java.lang.Override @java.lang.SuppressWarnings("all") - public Parent build() { - return new Parent(this); + public SuperBuilderCustomized.Parent build() { + return new SuperBuilderCustomized.Parent(this); } } @java.lang.SuppressWarnings("all") - protected Parent(final ParentBuilder b) { + protected Parent(final SuperBuilderCustomized.Parent.ParentBuilder b) { this.field1 = b.field1; } @java.lang.SuppressWarnings("all") - public static ParentBuilder builder() { - return new ParentBuilderImpl(); + public static SuperBuilderCustomized.Parent.ParentBuilder builder() { + return new SuperBuilderCustomized.Parent.ParentBuilderImpl(); } } public static class Child extends Parent { @@ -61,7 +61,7 @@ public class SuperBuilderCustomized { } @java.lang.Override @java.lang.SuppressWarnings("all") - protected ChildBuilderImpl self() { + protected SuperBuilderCustomized.Child.ChildBuilderImpl self() { return this; } } @@ -70,7 +70,7 @@ public class SuperBuilderCustomized { return new ChildBuilderImpl().field2(10.0); } @java.lang.SuppressWarnings("all") - public static abstract class ChildBuilder> extends Parent.ParentBuilder { + public static abstract class ChildBuilder> extends Parent.ParentBuilder { @java.lang.SuppressWarnings("all") private double field2; @java.lang.Override @@ -91,7 +91,7 @@ public class SuperBuilderCustomized { } } @java.lang.SuppressWarnings("all") - protected Child(final ChildBuilder b) { + protected Child(final SuperBuilderCustomized.Child.ChildBuilder b) { super(b); this.field2 = b.field2; } diff --git a/test/transform/resource/after-delombok/SuperBuilderSingularAnnotatedTypes.java b/test/transform/resource/after-delombok/SuperBuilderSingularAnnotatedTypes.java index 61c2557c..12c61096 100644 --- a/test/transform/resource/after-delombok/SuperBuilderSingularAnnotatedTypes.java +++ b/test/transform/resource/after-delombok/SuperBuilderSingularAnnotatedTypes.java @@ -10,7 +10,7 @@ class SuperBuilderSingularAnnotatedTypes { private Set<@MyAnnotation @NonNull String> foos; private Map<@MyAnnotation @NonNull String, @MyAnnotation @NonNull Integer> bars; @java.lang.SuppressWarnings("all") - public static abstract class SuperBuilderSingularAnnotatedTypesBuilder> { + public static abstract class SuperBuilderSingularAnnotatedTypesBuilder> { @java.lang.SuppressWarnings("all") private java.util.ArrayList<@MyAnnotation @NonNull String> foos; @java.lang.SuppressWarnings("all") @@ -84,13 +84,13 @@ class SuperBuilderSingularAnnotatedTypes { } } @java.lang.SuppressWarnings("all") - private static final class SuperBuilderSingularAnnotatedTypesBuilderImpl extends SuperBuilderSingularAnnotatedTypesBuilder { + private static final class SuperBuilderSingularAnnotatedTypesBuilderImpl extends SuperBuilderSingularAnnotatedTypes.SuperBuilderSingularAnnotatedTypesBuilder { @java.lang.SuppressWarnings("all") private SuperBuilderSingularAnnotatedTypesBuilderImpl() { } @java.lang.Override @java.lang.SuppressWarnings("all") - protected SuperBuilderSingularAnnotatedTypesBuilderImpl self() { + protected SuperBuilderSingularAnnotatedTypes.SuperBuilderSingularAnnotatedTypesBuilderImpl self() { return this; } @java.lang.Override @@ -100,7 +100,7 @@ class SuperBuilderSingularAnnotatedTypes { } } @java.lang.SuppressWarnings("all") - protected SuperBuilderSingularAnnotatedTypes(final SuperBuilderSingularAnnotatedTypesBuilder b) { + protected SuperBuilderSingularAnnotatedTypes(final SuperBuilderSingularAnnotatedTypes.SuperBuilderSingularAnnotatedTypesBuilder b) { java.util.Set<@MyAnnotation @NonNull String> foos; switch (b.foos == null ? 0 : b.foos.size()) { case 0: @@ -131,7 +131,7 @@ class SuperBuilderSingularAnnotatedTypes { this.bars = bars; } @java.lang.SuppressWarnings("all") - public static SuperBuilderSingularAnnotatedTypesBuilder builder() { - return new SuperBuilderSingularAnnotatedTypesBuilderImpl(); + public static SuperBuilderSingularAnnotatedTypes.SuperBuilderSingularAnnotatedTypesBuilder builder() { + return new SuperBuilderSingularAnnotatedTypes.SuperBuilderSingularAnnotatedTypesBuilderImpl(); } } \ No newline at end of file diff --git a/test/transform/resource/after-delombok/SuperBuilderWithCustomBuilderMethod.java b/test/transform/resource/after-delombok/SuperBuilderWithCustomBuilderMethod.java index fc303583..e042b238 100644 --- a/test/transform/resource/after-delombok/SuperBuilderWithCustomBuilderMethod.java +++ b/test/transform/resource/after-delombok/SuperBuilderWithCustomBuilderMethod.java @@ -4,7 +4,7 @@ public class SuperBuilderWithCustomBuilderMethod { A field1; List items; @java.lang.SuppressWarnings("all") - public static abstract class ParentBuilder, B extends ParentBuilder> { + public static abstract class ParentBuilder, B extends SuperBuilderWithCustomBuilderMethod.Parent.ParentBuilder> { @java.lang.SuppressWarnings("all") private A field1; @java.lang.SuppressWarnings("all") @@ -42,23 +42,23 @@ public class SuperBuilderWithCustomBuilderMethod { } } @java.lang.SuppressWarnings("all") - private static final class ParentBuilderImpl extends ParentBuilder, ParentBuilderImpl> { + private static final class ParentBuilderImpl extends SuperBuilderWithCustomBuilderMethod.Parent.ParentBuilder, SuperBuilderWithCustomBuilderMethod.Parent.ParentBuilderImpl> { @java.lang.SuppressWarnings("all") private ParentBuilderImpl() { } @java.lang.Override @java.lang.SuppressWarnings("all") - protected ParentBuilderImpl self() { + protected SuperBuilderWithCustomBuilderMethod.Parent.ParentBuilderImpl self() { return this; } @java.lang.Override @java.lang.SuppressWarnings("all") - public Parent build() { - return new Parent(this); + public SuperBuilderWithCustomBuilderMethod.Parent build() { + return new SuperBuilderWithCustomBuilderMethod.Parent(this); } } @java.lang.SuppressWarnings("all") - protected Parent(final ParentBuilder b) { + protected Parent(final SuperBuilderWithCustomBuilderMethod.Parent.ParentBuilder b) { this.field1 = b.field1; java.util.List items; switch (b.items == null ? 0 : b.items.size()) { @@ -74,8 +74,8 @@ public class SuperBuilderWithCustomBuilderMethod { this.items = items; } @java.lang.SuppressWarnings("all") - public static ParentBuilder builder() { - return new ParentBuilderImpl(); + public static SuperBuilderWithCustomBuilderMethod.Parent.ParentBuilder builder() { + return new SuperBuilderWithCustomBuilderMethod.Parent.ParentBuilderImpl(); } } public static class Child extends Parent { @@ -84,7 +84,7 @@ public class SuperBuilderWithCustomBuilderMethod { return new ChildBuilderImpl().item("default item"); } @java.lang.SuppressWarnings("all") - public static abstract class ChildBuilder, B extends ChildBuilder> extends Parent.ParentBuilder { + public static abstract class ChildBuilder, B extends SuperBuilderWithCustomBuilderMethod.Child.ChildBuilder> extends Parent.ParentBuilder { @java.lang.SuppressWarnings("all") private double field3; @java.lang.Override @@ -105,23 +105,23 @@ public class SuperBuilderWithCustomBuilderMethod { } } @java.lang.SuppressWarnings("all") - private static final class ChildBuilderImpl extends ChildBuilder, ChildBuilderImpl> { + private static final class ChildBuilderImpl extends SuperBuilderWithCustomBuilderMethod.Child.ChildBuilder, SuperBuilderWithCustomBuilderMethod.Child.ChildBuilderImpl> { @java.lang.SuppressWarnings("all") private ChildBuilderImpl() { } @java.lang.Override @java.lang.SuppressWarnings("all") - protected ChildBuilderImpl self() { + protected SuperBuilderWithCustomBuilderMethod.Child.ChildBuilderImpl self() { return this; } @java.lang.Override @java.lang.SuppressWarnings("all") - public Child build() { - return new Child(this); + public SuperBuilderWithCustomBuilderMethod.Child build() { + return new SuperBuilderWithCustomBuilderMethod.Child(this); } } @java.lang.SuppressWarnings("all") - protected Child(final ChildBuilder b) { + protected Child(final SuperBuilderWithCustomBuilderMethod.Child.ChildBuilder b) { super(b); this.field3 = b.field3; } diff --git a/test/transform/resource/after-delombok/SuperBuilderWithDefaults.java b/test/transform/resource/after-delombok/SuperBuilderWithDefaults.java index 2ac3d1b7..ad56cea2 100644 --- a/test/transform/resource/after-delombok/SuperBuilderWithDefaults.java +++ b/test/transform/resource/after-delombok/SuperBuilderWithDefaults.java @@ -12,7 +12,7 @@ public class SuperBuilderWithDefaults { return null; } @java.lang.SuppressWarnings("all") - public static abstract class ParentBuilder, B extends ParentBuilder> { + public static abstract class ParentBuilder, B extends SuperBuilderWithDefaults.Parent.ParentBuilder> { @java.lang.SuppressWarnings("all") private boolean millis$set; @java.lang.SuppressWarnings("all") @@ -44,31 +44,31 @@ public class SuperBuilderWithDefaults { } } @java.lang.SuppressWarnings("all") - private static final class ParentBuilderImpl extends ParentBuilder, ParentBuilderImpl> { + private static final class ParentBuilderImpl extends SuperBuilderWithDefaults.Parent.ParentBuilder, SuperBuilderWithDefaults.Parent.ParentBuilderImpl> { @java.lang.SuppressWarnings("all") private ParentBuilderImpl() { } @java.lang.Override @java.lang.SuppressWarnings("all") - protected ParentBuilderImpl self() { + protected SuperBuilderWithDefaults.Parent.ParentBuilderImpl self() { return this; } @java.lang.Override @java.lang.SuppressWarnings("all") - public Parent build() { - return new Parent(this); + public SuperBuilderWithDefaults.Parent build() { + return new SuperBuilderWithDefaults.Parent(this); } } @java.lang.SuppressWarnings("all") - protected Parent(final ParentBuilder b) { + protected Parent(final SuperBuilderWithDefaults.Parent.ParentBuilder b) { if (b.millis$set) this.millis = b.millis$value; - else this.millis = Parent.$default$millis(); + else this.millis = SuperBuilderWithDefaults.Parent.$default$millis(); if (b.numberField$set) this.numberField = b.numberField$value; - else this.numberField = Parent.$default$numberField(); + else this.numberField = SuperBuilderWithDefaults.Parent.$default$numberField(); } @java.lang.SuppressWarnings("all") - public static ParentBuilder builder() { - return new ParentBuilderImpl(); + public static SuperBuilderWithDefaults.Parent.ParentBuilder builder() { + return new SuperBuilderWithDefaults.Parent.ParentBuilderImpl(); } } public static class Child extends Parent { @@ -78,7 +78,7 @@ public class SuperBuilderWithDefaults { return Math.PI; } @java.lang.SuppressWarnings("all") - public static abstract class ChildBuilder> extends Parent.ParentBuilder { + public static abstract class ChildBuilder> extends Parent.ParentBuilder { @java.lang.SuppressWarnings("all") private boolean doubleField$set; @java.lang.SuppressWarnings("all") @@ -102,30 +102,30 @@ public class SuperBuilderWithDefaults { } } @java.lang.SuppressWarnings("all") - private static final class ChildBuilderImpl extends ChildBuilder { + private static final class ChildBuilderImpl extends SuperBuilderWithDefaults.Child.ChildBuilder { @java.lang.SuppressWarnings("all") private ChildBuilderImpl() { } @java.lang.Override @java.lang.SuppressWarnings("all") - protected ChildBuilderImpl self() { + protected SuperBuilderWithDefaults.Child.ChildBuilderImpl self() { return this; } @java.lang.Override @java.lang.SuppressWarnings("all") - public Child build() { - return new Child(this); + public SuperBuilderWithDefaults.Child build() { + return new SuperBuilderWithDefaults.Child(this); } } @java.lang.SuppressWarnings("all") - protected Child(final ChildBuilder b) { + protected Child(final SuperBuilderWithDefaults.Child.ChildBuilder b) { super(b); if (b.doubleField$set) this.doubleField = b.doubleField$value; - else this.doubleField = Child.$default$doubleField(); + else this.doubleField = SuperBuilderWithDefaults.Child.$default$doubleField(); } @java.lang.SuppressWarnings("all") - public static ChildBuilder builder() { - return new ChildBuilderImpl(); + public static SuperBuilderWithDefaults.Child.ChildBuilder builder() { + return new SuperBuilderWithDefaults.Child.ChildBuilderImpl(); } } public static void test() { diff --git a/test/transform/resource/after-delombok/SuperBuilderWithGenerics.java b/test/transform/resource/after-delombok/SuperBuilderWithGenerics.java index a1aeb971..2bac58f2 100644 --- a/test/transform/resource/after-delombok/SuperBuilderWithGenerics.java +++ b/test/transform/resource/after-delombok/SuperBuilderWithGenerics.java @@ -4,7 +4,7 @@ public class SuperBuilderWithGenerics { A field1; List items; @java.lang.SuppressWarnings("all") - public static abstract class ParentBuilder, B extends ParentBuilder> { + public static abstract class ParentBuilder, B extends SuperBuilderWithGenerics.Parent.ParentBuilder> { @java.lang.SuppressWarnings("all") private A field1; @java.lang.SuppressWarnings("all") @@ -42,23 +42,23 @@ public class SuperBuilderWithGenerics { } } @java.lang.SuppressWarnings("all") - private static final class ParentBuilderImpl extends ParentBuilder, ParentBuilderImpl> { + private static final class ParentBuilderImpl extends SuperBuilderWithGenerics.Parent.ParentBuilder, SuperBuilderWithGenerics.Parent.ParentBuilderImpl> { @java.lang.SuppressWarnings("all") private ParentBuilderImpl() { } @java.lang.Override @java.lang.SuppressWarnings("all") - protected ParentBuilderImpl self() { + protected SuperBuilderWithGenerics.Parent.ParentBuilderImpl self() { return this; } @java.lang.Override @java.lang.SuppressWarnings("all") - public Parent build() { - return new Parent(this); + public SuperBuilderWithGenerics.Parent build() { + return new SuperBuilderWithGenerics.Parent(this); } } @java.lang.SuppressWarnings("all") - protected Parent(final ParentBuilder b) { + protected Parent(final SuperBuilderWithGenerics.Parent.ParentBuilder b) { this.field1 = b.field1; java.util.List items; switch (b.items == null ? 0 : b.items.size()) { @@ -74,14 +74,14 @@ public class SuperBuilderWithGenerics { this.items = items; } @java.lang.SuppressWarnings("all") - public static ParentBuilder builder() { - return new ParentBuilderImpl(); + public static SuperBuilderWithGenerics.Parent.ParentBuilder builder() { + return new SuperBuilderWithGenerics.Parent.ParentBuilderImpl(); } } public static class Child extends Parent { double field3; @java.lang.SuppressWarnings("all") - public static abstract class ChildBuilder, B extends ChildBuilder> extends Parent.ParentBuilder { + public static abstract class ChildBuilder, B extends SuperBuilderWithGenerics.Child.ChildBuilder> extends Parent.ParentBuilder { @java.lang.SuppressWarnings("all") private double field3; @java.lang.Override @@ -102,29 +102,29 @@ public class SuperBuilderWithGenerics { } } @java.lang.SuppressWarnings("all") - private static final class ChildBuilderImpl extends ChildBuilder, ChildBuilderImpl> { + private static final class ChildBuilderImpl extends SuperBuilderWithGenerics.Child.ChildBuilder, SuperBuilderWithGenerics.Child.ChildBuilderImpl> { @java.lang.SuppressWarnings("all") private ChildBuilderImpl() { } @java.lang.Override @java.lang.SuppressWarnings("all") - protected ChildBuilderImpl self() { + protected SuperBuilderWithGenerics.Child.ChildBuilderImpl self() { return this; } @java.lang.Override @java.lang.SuppressWarnings("all") - public Child build() { - return new Child(this); + public SuperBuilderWithGenerics.Child build() { + return new SuperBuilderWithGenerics.Child(this); } } @java.lang.SuppressWarnings("all") - protected Child(final ChildBuilder b) { + protected Child(final SuperBuilderWithGenerics.Child.ChildBuilder b) { super(b); this.field3 = b.field3; } @java.lang.SuppressWarnings("all") - public static ChildBuilder builder() { - return new ChildBuilderImpl(); + public static SuperBuilderWithGenerics.Child.ChildBuilder builder() { + return new SuperBuilderWithGenerics.Child.ChildBuilderImpl(); } } public static void test() { diff --git a/test/transform/resource/after-delombok/SuperBuilderWithGenerics2.java b/test/transform/resource/after-delombok/SuperBuilderWithGenerics2.java index 6e9988f5..0f4a6c54 100644 --- a/test/transform/resource/after-delombok/SuperBuilderWithGenerics2.java +++ b/test/transform/resource/after-delombok/SuperBuilderWithGenerics2.java @@ -4,7 +4,7 @@ public class SuperBuilderWithGenerics2 { A field1; List items; @java.lang.SuppressWarnings("all") - public static abstract class ParentBuilder, B extends ParentBuilder> { + public static abstract class ParentBuilder, B extends SuperBuilderWithGenerics2.Parent.ParentBuilder> { @java.lang.SuppressWarnings("all") private A field1; @java.lang.SuppressWarnings("all") @@ -42,23 +42,23 @@ public class SuperBuilderWithGenerics2 { } } @java.lang.SuppressWarnings("all") - private static final class ParentBuilderImpl extends ParentBuilder, ParentBuilderImpl> { + private static final class ParentBuilderImpl extends SuperBuilderWithGenerics2.Parent.ParentBuilder, SuperBuilderWithGenerics2.Parent.ParentBuilderImpl> { @java.lang.SuppressWarnings("all") private ParentBuilderImpl() { } @java.lang.Override @java.lang.SuppressWarnings("all") - protected ParentBuilderImpl self() { + protected SuperBuilderWithGenerics2.Parent.ParentBuilderImpl self() { return this; } @java.lang.Override @java.lang.SuppressWarnings("all") - public Parent build() { - return new Parent(this); + public SuperBuilderWithGenerics2.Parent build() { + return new SuperBuilderWithGenerics2.Parent(this); } } @java.lang.SuppressWarnings("all") - protected Parent(final ParentBuilder b) { + protected Parent(final SuperBuilderWithGenerics2.Parent.ParentBuilder b) { this.field1 = b.field1; java.util.List items; switch (b.items == null ? 0 : b.items.size()) { @@ -74,14 +74,14 @@ public class SuperBuilderWithGenerics2 { this.items = items; } @java.lang.SuppressWarnings("all") - public static ParentBuilder builder() { - return new ParentBuilderImpl(); + public static SuperBuilderWithGenerics2.Parent.ParentBuilder builder() { + return new SuperBuilderWithGenerics2.Parent.ParentBuilderImpl(); } } public static class Child extends Parent { A field3; @java.lang.SuppressWarnings("all") - public static abstract class ChildBuilder, B extends ChildBuilder> extends Parent.ParentBuilder { + public static abstract class ChildBuilder, B extends SuperBuilderWithGenerics2.Child.ChildBuilder> extends Parent.ParentBuilder { @java.lang.SuppressWarnings("all") private A field3; @java.lang.Override @@ -102,29 +102,29 @@ public class SuperBuilderWithGenerics2 { } } @java.lang.SuppressWarnings("all") - private static final class ChildBuilderImpl extends ChildBuilder, ChildBuilderImpl> { + private static final class ChildBuilderImpl extends SuperBuilderWithGenerics2.Child.ChildBuilder, SuperBuilderWithGenerics2.Child.ChildBuilderImpl> { @java.lang.SuppressWarnings("all") private ChildBuilderImpl() { } @java.lang.Override @java.lang.SuppressWarnings("all") - protected ChildBuilderImpl self() { + protected SuperBuilderWithGenerics2.Child.ChildBuilderImpl self() { return this; } @java.lang.Override @java.lang.SuppressWarnings("all") - public Child build() { - return new Child(this); + public SuperBuilderWithGenerics2.Child build() { + return new SuperBuilderWithGenerics2.Child(this); } } @java.lang.SuppressWarnings("all") - protected Child(final ChildBuilder b) { + protected Child(final SuperBuilderWithGenerics2.Child.ChildBuilder b) { super(b); this.field3 = b.field3; } @java.lang.SuppressWarnings("all") - public static ChildBuilder builder2() { - return new ChildBuilderImpl(); + public static SuperBuilderWithGenerics2.Child.ChildBuilder builder2() { + return new SuperBuilderWithGenerics2.Child.ChildBuilderImpl(); } } public static void test() { diff --git a/test/transform/resource/after-delombok/SuperBuilderWithGenerics3.java b/test/transform/resource/after-delombok/SuperBuilderWithGenerics3.java index ac970796..b21f8fee 100644 --- a/test/transform/resource/after-delombok/SuperBuilderWithGenerics3.java +++ b/test/transform/resource/after-delombok/SuperBuilderWithGenerics3.java @@ -3,7 +3,7 @@ public class SuperBuilderWithGenerics3 { public static class Parent { private final String str; @java.lang.SuppressWarnings("all") - public static abstract class ParentBuilder, B extends ParentBuilder> { + public static abstract class ParentBuilder, B extends SuperBuilderWithGenerics3.Parent.ParentBuilder> { @java.lang.SuppressWarnings("all") private String str; @java.lang.SuppressWarnings("all") @@ -22,28 +22,28 @@ public class SuperBuilderWithGenerics3 { } } @java.lang.SuppressWarnings("all") - private static final class ParentBuilderImpl extends ParentBuilder, ParentBuilderImpl> { + private static final class ParentBuilderImpl extends SuperBuilderWithGenerics3.Parent.ParentBuilder, SuperBuilderWithGenerics3.Parent.ParentBuilderImpl> { @java.lang.SuppressWarnings("all") private ParentBuilderImpl() { } @java.lang.Override @java.lang.SuppressWarnings("all") - protected ParentBuilderImpl self() { + protected SuperBuilderWithGenerics3.Parent.ParentBuilderImpl self() { return this; } @java.lang.Override @java.lang.SuppressWarnings("all") - public Parent build() { - return new Parent(this); + public SuperBuilderWithGenerics3.Parent build() { + return new SuperBuilderWithGenerics3.Parent(this); } } @java.lang.SuppressWarnings("all") - protected Parent(final ParentBuilder b) { + protected Parent(final SuperBuilderWithGenerics3.Parent.ParentBuilder b) { this.str = b.str; } @java.lang.SuppressWarnings("all") - public static ParentBuilder builder() { - return new ParentBuilderImpl(); + public static SuperBuilderWithGenerics3.Parent.ParentBuilder builder() { + return new SuperBuilderWithGenerics3.Parent.ParentBuilderImpl(); } } public static class Child extends Parent { @@ -51,7 +51,7 @@ public class SuperBuilderWithGenerics3 { } double field3; @java.lang.SuppressWarnings("all") - public static abstract class ChildBuilder> extends Parent.ParentBuilder { + public static abstract class ChildBuilder> extends Parent.ParentBuilder { @java.lang.SuppressWarnings("all") private double field3; @java.lang.Override @@ -72,29 +72,29 @@ public class SuperBuilderWithGenerics3 { } } @java.lang.SuppressWarnings("all") - private static final class ChildBuilderImpl extends ChildBuilder { + private static final class ChildBuilderImpl extends SuperBuilderWithGenerics3.Child.ChildBuilder { @java.lang.SuppressWarnings("all") private ChildBuilderImpl() { } @java.lang.Override @java.lang.SuppressWarnings("all") - protected ChildBuilderImpl self() { + protected SuperBuilderWithGenerics3.Child.ChildBuilderImpl self() { return this; } @java.lang.Override @java.lang.SuppressWarnings("all") - public Child build() { - return new Child(this); + public SuperBuilderWithGenerics3.Child build() { + return new SuperBuilderWithGenerics3.Child(this); } } @java.lang.SuppressWarnings("all") - protected Child(final ChildBuilder b) { + protected Child(final SuperBuilderWithGenerics3.Child.ChildBuilder b) { super(b); this.field3 = b.field3; } @java.lang.SuppressWarnings("all") - public static ChildBuilder builder() { - return new ChildBuilderImpl(); + public static SuperBuilderWithGenerics3.Child.ChildBuilder builder() { + return new SuperBuilderWithGenerics3.Child.ChildBuilderImpl(); } } } \ No newline at end of file diff --git a/test/transform/resource/after-delombok/SuperBuilderWithGenericsAndToBuilder.java b/test/transform/resource/after-delombok/SuperBuilderWithGenericsAndToBuilder.java index af67e900..a6c44c7f 100644 --- a/test/transform/resource/after-delombok/SuperBuilderWithGenericsAndToBuilder.java +++ b/test/transform/resource/after-delombok/SuperBuilderWithGenericsAndToBuilder.java @@ -4,7 +4,7 @@ public class SuperBuilderWithGenericsAndToBuilder { A field1; Map items; @java.lang.SuppressWarnings("all") - public static abstract class ParentBuilder, B extends ParentBuilder> { + public static abstract class ParentBuilder, B extends SuperBuilderWithGenericsAndToBuilder.Parent.ParentBuilder> { @java.lang.SuppressWarnings("all") private A field1; @java.lang.SuppressWarnings("all") @@ -13,11 +13,11 @@ public class SuperBuilderWithGenericsAndToBuilder { private java.util.ArrayList items$value; @java.lang.SuppressWarnings("all") protected B $fillValuesFrom(final C instance) { - ParentBuilder.$fillValuesFromInstanceIntoBuilder(instance, this); + SuperBuilderWithGenericsAndToBuilder.Parent.ParentBuilder.$fillValuesFromInstanceIntoBuilder(instance, this); return self(); } @java.lang.SuppressWarnings("all") - private static void $fillValuesFromInstanceIntoBuilder(final Parent instance, final ParentBuilder b) { + private static void $fillValuesFromInstanceIntoBuilder(final SuperBuilderWithGenericsAndToBuilder.Parent instance, final SuperBuilderWithGenericsAndToBuilder.Parent.ParentBuilder b) { b.field1(instance.field1); b.items(instance.items == null ? java.util.Collections.emptyMap() : instance.items); } @@ -67,23 +67,23 @@ public class SuperBuilderWithGenericsAndToBuilder { } } @java.lang.SuppressWarnings("all") - private static final class ParentBuilderImpl extends ParentBuilder, ParentBuilderImpl> { + private static final class ParentBuilderImpl extends SuperBuilderWithGenericsAndToBuilder.Parent.ParentBuilder, SuperBuilderWithGenericsAndToBuilder.Parent.ParentBuilderImpl> { @java.lang.SuppressWarnings("all") private ParentBuilderImpl() { } @java.lang.Override @java.lang.SuppressWarnings("all") - protected ParentBuilderImpl self() { + protected SuperBuilderWithGenericsAndToBuilder.Parent.ParentBuilderImpl self() { return this; } @java.lang.Override @java.lang.SuppressWarnings("all") - public Parent build() { - return new Parent(this); + public SuperBuilderWithGenericsAndToBuilder.Parent build() { + return new SuperBuilderWithGenericsAndToBuilder.Parent(this); } } @java.lang.SuppressWarnings("all") - protected Parent(final ParentBuilder b) { + protected Parent(final SuperBuilderWithGenericsAndToBuilder.Parent.ParentBuilder b) { this.field1 = b.field1; java.util.Map items; switch (b.items$key == null ? 0 : b.items$key.size()) { @@ -101,29 +101,29 @@ public class SuperBuilderWithGenericsAndToBuilder { this.items = items; } @java.lang.SuppressWarnings("all") - public static ParentBuilder builder() { - return new ParentBuilderImpl(); + public static SuperBuilderWithGenericsAndToBuilder.Parent.ParentBuilder builder() { + return new SuperBuilderWithGenericsAndToBuilder.Parent.ParentBuilderImpl(); } @java.lang.SuppressWarnings("all") - public ParentBuilder toBuilder() { - return new ParentBuilderImpl().$fillValuesFrom(this); + public SuperBuilderWithGenericsAndToBuilder.Parent.ParentBuilder toBuilder() { + return new SuperBuilderWithGenericsAndToBuilder.Parent.ParentBuilderImpl().$fillValuesFrom(this); } } public static class Child extends Parent { double field3; @java.lang.SuppressWarnings("all") - public static abstract class ChildBuilder, B extends ChildBuilder> extends Parent.ParentBuilder { + public static abstract class ChildBuilder, B extends SuperBuilderWithGenericsAndToBuilder.Child.ChildBuilder> extends Parent.ParentBuilder { @java.lang.SuppressWarnings("all") private double field3; @java.lang.Override @java.lang.SuppressWarnings("all") protected B $fillValuesFrom(final C instance) { super.$fillValuesFrom(instance); - ChildBuilder.$fillValuesFromInstanceIntoBuilder(instance, this); + SuperBuilderWithGenericsAndToBuilder.Child.ChildBuilder.$fillValuesFromInstanceIntoBuilder(instance, this); return self(); } @java.lang.SuppressWarnings("all") - private static void $fillValuesFromInstanceIntoBuilder(final Child instance, final ChildBuilder b) { + private static void $fillValuesFromInstanceIntoBuilder(final SuperBuilderWithGenericsAndToBuilder.Child instance, final SuperBuilderWithGenericsAndToBuilder.Child.ChildBuilder b) { b.field3(instance.field3); } @java.lang.Override @@ -144,33 +144,33 @@ public class SuperBuilderWithGenericsAndToBuilder { } } @java.lang.SuppressWarnings("all") - private static final class ChildBuilderImpl extends ChildBuilder, ChildBuilderImpl> { + private static final class ChildBuilderImpl extends SuperBuilderWithGenericsAndToBuilder.Child.ChildBuilder, SuperBuilderWithGenericsAndToBuilder.Child.ChildBuilderImpl> { @java.lang.SuppressWarnings("all") private ChildBuilderImpl() { } @java.lang.Override @java.lang.SuppressWarnings("all") - protected ChildBuilderImpl self() { + protected SuperBuilderWithGenericsAndToBuilder.Child.ChildBuilderImpl self() { return this; } @java.lang.Override @java.lang.SuppressWarnings("all") - public Child build() { - return new Child(this); + public SuperBuilderWithGenericsAndToBuilder.Child build() { + return new SuperBuilderWithGenericsAndToBuilder.Child(this); } } @java.lang.SuppressWarnings("all") - protected Child(final ChildBuilder b) { + protected Child(final SuperBuilderWithGenericsAndToBuilder.Child.ChildBuilder b) { super(b); this.field3 = b.field3; } @java.lang.SuppressWarnings("all") - public static ChildBuilder builder() { - return new ChildBuilderImpl(); + public static SuperBuilderWithGenericsAndToBuilder.Child.ChildBuilder builder() { + return new SuperBuilderWithGenericsAndToBuilder.Child.ChildBuilderImpl(); } @java.lang.SuppressWarnings("all") - public ChildBuilder toBuilder() { - return new ChildBuilderImpl().$fillValuesFrom(this); + public SuperBuilderWithGenericsAndToBuilder.Child.ChildBuilder toBuilder() { + return new SuperBuilderWithGenericsAndToBuilder.Child.ChildBuilderImpl().$fillValuesFrom(this); } } public static void test() { diff --git a/test/transform/resource/after-delombok/SuperBuilderWithNonNull.java b/test/transform/resource/after-delombok/SuperBuilderWithNonNull.java index 52328780..7c9a5a13 100644 --- a/test/transform/resource/after-delombok/SuperBuilderWithNonNull.java +++ b/test/transform/resource/after-delombok/SuperBuilderWithNonNull.java @@ -8,7 +8,7 @@ public class SuperBuilderWithNonNull { return "default"; } @java.lang.SuppressWarnings("all") - public static abstract class ParentBuilder> { + public static abstract class ParentBuilder> { @java.lang.SuppressWarnings("all") private boolean nonNullParentField$set; @java.lang.SuppressWarnings("all") @@ -33,39 +33,39 @@ public class SuperBuilderWithNonNull { } } @java.lang.SuppressWarnings("all") - private static final class ParentBuilderImpl extends ParentBuilder { + private static final class ParentBuilderImpl extends SuperBuilderWithNonNull.Parent.ParentBuilder { @java.lang.SuppressWarnings("all") private ParentBuilderImpl() { } @java.lang.Override @java.lang.SuppressWarnings("all") - protected ParentBuilderImpl self() { + protected SuperBuilderWithNonNull.Parent.ParentBuilderImpl self() { return this; } @java.lang.Override @java.lang.SuppressWarnings("all") - public Parent build() { - return new Parent(this); + public SuperBuilderWithNonNull.Parent build() { + return new SuperBuilderWithNonNull.Parent(this); } } @java.lang.SuppressWarnings("all") - protected Parent(final ParentBuilder b) { + protected Parent(final SuperBuilderWithNonNull.Parent.ParentBuilder b) { if (b.nonNullParentField$set) this.nonNullParentField = b.nonNullParentField$value; - else this.nonNullParentField = Parent.$default$nonNullParentField(); + else this.nonNullParentField = SuperBuilderWithNonNull.Parent.$default$nonNullParentField(); if (nonNullParentField == null) { throw new java.lang.NullPointerException("nonNullParentField is marked non-null but is null"); } } @java.lang.SuppressWarnings("all") - public static ParentBuilder builder() { - return new ParentBuilderImpl(); + public static SuperBuilderWithNonNull.Parent.ParentBuilder builder() { + return new SuperBuilderWithNonNull.Parent.ParentBuilderImpl(); } } public static class Child extends Parent { @lombok.NonNull String nonNullChildField; @java.lang.SuppressWarnings("all") - public static abstract class ChildBuilder> extends Parent.ParentBuilder { + public static abstract class ChildBuilder> extends Parent.ParentBuilder { @java.lang.SuppressWarnings("all") private String nonNullChildField; @java.lang.Override @@ -89,23 +89,23 @@ public class SuperBuilderWithNonNull { } } @java.lang.SuppressWarnings("all") - private static final class ChildBuilderImpl extends ChildBuilder { + private static final class ChildBuilderImpl extends SuperBuilderWithNonNull.Child.ChildBuilder { @java.lang.SuppressWarnings("all") private ChildBuilderImpl() { } @java.lang.Override @java.lang.SuppressWarnings("all") - protected ChildBuilderImpl self() { + protected SuperBuilderWithNonNull.Child.ChildBuilderImpl self() { return this; } @java.lang.Override @java.lang.SuppressWarnings("all") - public Child build() { - return new Child(this); + public SuperBuilderWithNonNull.Child build() { + return new SuperBuilderWithNonNull.Child(this); } } @java.lang.SuppressWarnings("all") - protected Child(final ChildBuilder b) { + protected Child(final SuperBuilderWithNonNull.Child.ChildBuilder b) { super(b); this.nonNullChildField = b.nonNullChildField; if (nonNullChildField == null) { @@ -113,8 +113,8 @@ public class SuperBuilderWithNonNull { } } @java.lang.SuppressWarnings("all") - public static ChildBuilder builder() { - return new ChildBuilderImpl(); + public static SuperBuilderWithNonNull.Child.ChildBuilder builder() { + return new SuperBuilderWithNonNull.Child.ChildBuilderImpl(); } } public static void test() { diff --git a/test/transform/resource/after-delombok/SuperBuilderWithPrefixes.java b/test/transform/resource/after-delombok/SuperBuilderWithPrefixes.java index 2fb2dcca..15c8d9b9 100644 --- a/test/transform/resource/after-delombok/SuperBuilderWithPrefixes.java +++ b/test/transform/resource/after-delombok/SuperBuilderWithPrefixes.java @@ -3,7 +3,7 @@ class SuperBuilderWithPrefixes { int xOtherField; java.util.List mItems; @java.lang.SuppressWarnings("all") - public static abstract class SuperBuilderWithPrefixesBuilder> { + public static abstract class SuperBuilderWithPrefixesBuilder> { @java.lang.SuppressWarnings("all") private int field; @java.lang.SuppressWarnings("all") @@ -48,13 +48,13 @@ class SuperBuilderWithPrefixes { } } @java.lang.SuppressWarnings("all") - private static final class SuperBuilderWithPrefixesBuilderImpl extends SuperBuilderWithPrefixesBuilder { + private static final class SuperBuilderWithPrefixesBuilderImpl extends SuperBuilderWithPrefixes.SuperBuilderWithPrefixesBuilder { @java.lang.SuppressWarnings("all") private SuperBuilderWithPrefixesBuilderImpl() { } @java.lang.Override @java.lang.SuppressWarnings("all") - protected SuperBuilderWithPrefixesBuilderImpl self() { + protected SuperBuilderWithPrefixes.SuperBuilderWithPrefixesBuilderImpl self() { return this; } @java.lang.Override @@ -64,7 +64,7 @@ class SuperBuilderWithPrefixes { } } @java.lang.SuppressWarnings("all") - protected SuperBuilderWithPrefixes(final SuperBuilderWithPrefixesBuilder b) { + protected SuperBuilderWithPrefixes(final SuperBuilderWithPrefixes.SuperBuilderWithPrefixesBuilder b) { this.mField = b.field; this.xOtherField = b.otherField; java.util.List items; @@ -81,7 +81,7 @@ class SuperBuilderWithPrefixes { this.mItems = items; } @java.lang.SuppressWarnings("all") - public static SuperBuilderWithPrefixesBuilder builder() { - return new SuperBuilderWithPrefixesBuilderImpl(); + public static SuperBuilderWithPrefixes.SuperBuilderWithPrefixesBuilder builder() { + return new SuperBuilderWithPrefixes.SuperBuilderWithPrefixesBuilderImpl(); } } \ No newline at end of file diff --git a/test/transform/resource/after-ecj/BuilderComplex.java b/test/transform/resource/after-ecj/BuilderComplex.java index 23dbf058..b8265415 100644 --- a/test/transform/resource/after-ecj/BuilderComplex.java +++ b/test/transform/resource/after-ecj/BuilderComplex.java @@ -9,19 +9,19 @@ class BuilderComplex { @java.lang.SuppressWarnings("all") TestVoidName() { super(); } - public @java.lang.SuppressWarnings("all") TestVoidName number(final T number) { + public @java.lang.SuppressWarnings("all") BuilderComplex.TestVoidName number(final T number) { this.number = number; return this; } - public @java.lang.SuppressWarnings("all") TestVoidName arg2(final int arg2) { + public @java.lang.SuppressWarnings("all") BuilderComplex.TestVoidName arg2(final int arg2) { this.arg2 = arg2; return this; } - public @java.lang.SuppressWarnings("all") TestVoidName arg3(final String arg3) { + public @java.lang.SuppressWarnings("all") BuilderComplex.TestVoidName arg3(final String arg3) { this.arg3 = arg3; return this; } - public @java.lang.SuppressWarnings("all") TestVoidName selfRef(final BuilderComplex selfRef) { + public @java.lang.SuppressWarnings("all") BuilderComplex.TestVoidName selfRef(final BuilderComplex selfRef) { this.selfRef = selfRef; return this; } @@ -37,7 +37,7 @@ class BuilderComplex { } private static @Builder(buildMethodName = "execute") void testVoidWithGenerics(T number, int arg2, String arg3, BuilderComplex selfRef) { } - public static @java.lang.SuppressWarnings("all") TestVoidName builder() { - return new TestVoidName(); + public static @java.lang.SuppressWarnings("all") BuilderComplex.TestVoidName builder() { + return new BuilderComplex.TestVoidName(); } } diff --git a/test/transform/resource/after-ecj/BuilderCustomName.java b/test/transform/resource/after-ecj/BuilderCustomName.java index 1067a9d1..ee44cc75 100644 --- a/test/transform/resource/after-ecj/BuilderCustomName.java +++ b/test/transform/resource/after-ecj/BuilderCustomName.java @@ -1,6 +1,6 @@ import java.util.List; @lombok.experimental.SuperBuilder class BuilderCustomName { - public static abstract @java.lang.SuppressWarnings("all") class SimpleTestBuilder, B extends SimpleTestBuilder> { + public static abstract @java.lang.SuppressWarnings("all") class SimpleTestBuilder, B extends BuilderCustomName.SimpleTestBuilder> { private @java.lang.SuppressWarnings("all") int field; public SimpleTestBuilder() { super(); @@ -15,11 +15,11 @@ import java.util.List; return (("BuilderCustomName.SimpleTestBuilder(field=" + this.field) + ")"); } } - private static final @java.lang.SuppressWarnings("all") class SimpleTestBuilderImpl extends SimpleTestBuilder, SimpleTestBuilderImpl> { + private static final @java.lang.SuppressWarnings("all") class SimpleTestBuilderImpl extends BuilderCustomName.SimpleTestBuilder, BuilderCustomName.SimpleTestBuilderImpl> { private SimpleTestBuilderImpl() { super(); } - protected @java.lang.Override @java.lang.SuppressWarnings("all") SimpleTestBuilderImpl self() { + protected @java.lang.Override @java.lang.SuppressWarnings("all") BuilderCustomName.SimpleTestBuilderImpl self() { return this; } public @java.lang.Override @java.lang.SuppressWarnings("all") BuilderCustomName build() { @@ -27,11 +27,11 @@ import java.util.List; } } private final int field; - protected @java.lang.SuppressWarnings("all") BuilderCustomName(final SimpleTestBuilder b) { + protected @java.lang.SuppressWarnings("all") BuilderCustomName(final BuilderCustomName.SimpleTestBuilder b) { super(); this.field = b.field; } - public static @java.lang.SuppressWarnings("all") SimpleTestBuilder builder() { - return new SimpleTestBuilderImpl(); + public static @java.lang.SuppressWarnings("all") BuilderCustomName.SimpleTestBuilder builder() { + return new BuilderCustomName.SimpleTestBuilderImpl(); } } diff --git a/test/transform/resource/after-ecj/BuilderDefaults.java b/test/transform/resource/after-ecj/BuilderDefaults.java index b9588386..6226022e 100644 --- a/test/transform/resource/after-ecj/BuilderDefaults.java +++ b/test/transform/resource/after-ecj/BuilderDefaults.java @@ -10,16 +10,16 @@ public final @Value @Builder class BuilderDefaults { @java.lang.SuppressWarnings("all") BuilderDefaultsBuilder() { super(); } - public @java.lang.SuppressWarnings("all") BuilderDefaultsBuilder x(final int x) { + public @java.lang.SuppressWarnings("all") BuilderDefaults.BuilderDefaultsBuilder x(final int x) { this.x$value = x; x$set = true; return this; } - public @java.lang.SuppressWarnings("all") BuilderDefaultsBuilder name(final String name) { + public @java.lang.SuppressWarnings("all") BuilderDefaults.BuilderDefaultsBuilder name(final String name) { this.name = name; return this; } - public @java.lang.SuppressWarnings("all") BuilderDefaultsBuilder z(final long z) { + public @java.lang.SuppressWarnings("all") BuilderDefaults.BuilderDefaultsBuilder z(final long z) { this.z$value = z; z$set = true; return this; @@ -46,8 +46,8 @@ public final @Value @Builder class BuilderDefaults { this.name = name; this.z = z; } - public static @java.lang.SuppressWarnings("all") BuilderDefaultsBuilder builder() { - return new BuilderDefaultsBuilder(); + public static @java.lang.SuppressWarnings("all") BuilderDefaults.BuilderDefaultsBuilder builder() { + return new BuilderDefaults.BuilderDefaultsBuilder(); } public @java.lang.SuppressWarnings("all") int getX() { return this.x; diff --git a/test/transform/resource/after-ecj/BuilderDefaultsGenerics.java b/test/transform/resource/after-ecj/BuilderDefaultsGenerics.java index 8f9da4b3..4e32de42 100644 --- a/test/transform/resource/after-ecj/BuilderDefaultsGenerics.java +++ b/test/transform/resource/after-ecj/BuilderDefaultsGenerics.java @@ -11,17 +11,17 @@ public @Builder class BuilderDefaultsGenerics callable(final java.util.concurrent.Callable callable) { + public @java.lang.SuppressWarnings("all") BuilderDefaultsGenerics.BuilderDefaultsGenericsBuilder callable(final java.util.concurrent.Callable callable) { this.callable$value = callable; callable$set = true; return this; } - public @java.lang.SuppressWarnings("all") BuilderDefaultsGenericsBuilder tee(final T tee) { + public @java.lang.SuppressWarnings("all") BuilderDefaultsGenerics.BuilderDefaultsGenericsBuilder tee(final T tee) { this.tee$value = tee; tee$set = true; return this; } - public @java.lang.SuppressWarnings("all") BuilderDefaultsGenericsBuilder arrr(final R arrr) { + public @java.lang.SuppressWarnings("all") BuilderDefaultsGenerics.BuilderDefaultsGenericsBuilder arrr(final R arrr) { this.arrr$value = arrr; arrr$set = true; return this; @@ -51,7 +51,7 @@ public @Builder class BuilderDefaultsGenerics>BuilderDefaultsGenericsBuilder builder() { - return new BuilderDefaultsGenericsBuilder(); + public static @java.lang.SuppressWarnings("all") >BuilderDefaultsGenerics.BuilderDefaultsGenericsBuilder builder() { + return new BuilderDefaultsGenerics.BuilderDefaultsGenericsBuilder(); } } diff --git a/test/transform/resource/after-ecj/BuilderDefaultsWarnings.java b/test/transform/resource/after-ecj/BuilderDefaultsWarnings.java index 1078f452..296f72dc 100644 --- a/test/transform/resource/after-ecj/BuilderDefaultsWarnings.java +++ b/test/transform/resource/after-ecj/BuilderDefaultsWarnings.java @@ -8,27 +8,27 @@ public @Builder class BuilderDefaultsWarnings { @java.lang.SuppressWarnings("all") BuilderDefaultsWarningsBuilder() { super(); } - public @java.lang.SuppressWarnings("all") BuilderDefaultsWarningsBuilder x(final long x) { + public @java.lang.SuppressWarnings("all") BuilderDefaultsWarnings.BuilderDefaultsWarningsBuilder x(final long x) { this.x = x; return this; } - public @java.lang.SuppressWarnings("all") BuilderDefaultsWarningsBuilder z(final int z) { + public @java.lang.SuppressWarnings("all") BuilderDefaultsWarnings.BuilderDefaultsWarningsBuilder z(final int z) { this.z = z; return this; } - public @java.lang.SuppressWarnings("all") BuilderDefaultsWarningsBuilder item(final String item) { + public @java.lang.SuppressWarnings("all") BuilderDefaultsWarnings.BuilderDefaultsWarningsBuilder item(final String item) { if ((this.items == null)) this.items = new java.util.ArrayList(); this.items.add(item); return this; } - public @java.lang.SuppressWarnings("all") BuilderDefaultsWarningsBuilder items(final java.util.Collection items) { + public @java.lang.SuppressWarnings("all") BuilderDefaultsWarnings.BuilderDefaultsWarningsBuilder items(final java.util.Collection items) { if ((this.items == null)) this.items = new java.util.ArrayList(); this.items.addAll(items); return this; } - public @java.lang.SuppressWarnings("all") BuilderDefaultsWarningsBuilder clearItems() { + public @java.lang.SuppressWarnings("all") BuilderDefaultsWarnings.BuilderDefaultsWarningsBuilder clearItems() { if ((this.items != null)) this.items.clear(); return this; @@ -61,8 +61,8 @@ public @Builder class BuilderDefaultsWarnings { this.z = z; this.items = items; } - public static @java.lang.SuppressWarnings("all") BuilderDefaultsWarningsBuilder builder() { - return new BuilderDefaultsWarningsBuilder(); + public static @java.lang.SuppressWarnings("all") BuilderDefaultsWarnings.BuilderDefaultsWarningsBuilder builder() { + return new BuilderDefaultsWarnings.BuilderDefaultsWarningsBuilder(); } } class NoBuilderButHasDefaults { @@ -81,7 +81,7 @@ class NoBuilderButHasDefaults { public @Builder NoBuilderButHasDefaults() { super(); } - public static @java.lang.SuppressWarnings("all") NoBuilderButHasDefaultsBuilder builder() { - return new NoBuilderButHasDefaultsBuilder(); + public static @java.lang.SuppressWarnings("all") NoBuilderButHasDefaults.NoBuilderButHasDefaultsBuilder builder() { + return new NoBuilderButHasDefaults.NoBuilderButHasDefaultsBuilder(); } } \ No newline at end of file diff --git a/test/transform/resource/after-ecj/BuilderGenericMethod.java b/test/transform/resource/after-ecj/BuilderGenericMethod.java index 1b770654..7965599d 100644 --- a/test/transform/resource/after-ecj/BuilderGenericMethod.java +++ b/test/transform/resource/after-ecj/BuilderGenericMethod.java @@ -8,11 +8,11 @@ class BuilderGenericMethod { @java.lang.SuppressWarnings("all") MapBuilder() { super(); } - public @java.lang.SuppressWarnings("all") MapBuilder a(final int a) { + public @java.lang.SuppressWarnings("all") BuilderGenericMethod.MapBuilder a(final int a) { this.a = a; return this; } - public @java.lang.SuppressWarnings("all") MapBuilder b(final long b) { + public @java.lang.SuppressWarnings("all") BuilderGenericMethod.MapBuilder b(final long b) { this.b = b; return this; } @@ -29,7 +29,7 @@ class BuilderGenericMethod { public @Builder Map foo(int a, long b) { return null; } - public @java.lang.SuppressWarnings("all") MapBuilder builder() { - return new MapBuilder(); + public @java.lang.SuppressWarnings("all") BuilderGenericMethod.MapBuilder builder() { + return this.new MapBuilder(); } } diff --git a/test/transform/resource/after-ecj/BuilderInstanceMethod.java b/test/transform/resource/after-ecj/BuilderInstanceMethod.java index 5f57aef7..397ba113 100644 --- a/test/transform/resource/after-ecj/BuilderInstanceMethod.java +++ b/test/transform/resource/after-ecj/BuilderInstanceMethod.java @@ -8,19 +8,19 @@ class BuilderInstanceMethod { @java.lang.SuppressWarnings("all") StringBuilder() { super(); } - public @java.lang.SuppressWarnings("all") StringBuilder show(final int show) { + public @java.lang.SuppressWarnings("all") BuilderInstanceMethod.StringBuilder show(final int show) { this.show = show; return this; } - public @java.lang.SuppressWarnings("all") StringBuilder yes(final int yes) { + public @java.lang.SuppressWarnings("all") BuilderInstanceMethod.StringBuilder yes(final int yes) { this.yes = yes; return this; } - public @java.lang.SuppressWarnings("all") StringBuilder also(final List also) { + public @java.lang.SuppressWarnings("all") BuilderInstanceMethod.StringBuilder also(final List also) { this.also = also; return this; } - public @java.lang.SuppressWarnings("all") StringBuilder $andMe(final int $andMe) { + public @java.lang.SuppressWarnings("all") BuilderInstanceMethod.StringBuilder $andMe(final int $andMe) { this.$andMe = $andMe; return this; } @@ -37,7 +37,7 @@ class BuilderInstanceMethod { public @lombok.Builder String create(int show, final int yes, List also, int $andMe) { return (((("" + show) + yes) + also) + $andMe); } - public @java.lang.SuppressWarnings("all") StringBuilder builder() { - return new StringBuilder(); + public @java.lang.SuppressWarnings("all") BuilderInstanceMethod.StringBuilder builder() { + return this.new StringBuilder(); } } diff --git a/test/transform/resource/after-ecj/BuilderJavadoc.java b/test/transform/resource/after-ecj/BuilderJavadoc.java index b7403835..303cbb5c 100644 --- a/test/transform/resource/after-ecj/BuilderJavadoc.java +++ b/test/transform/resource/after-ecj/BuilderJavadoc.java @@ -16,11 +16,11 @@ import java.util.List; @java.lang.SuppressWarnings("all") BuilderJavadocBuilder() { super(); } - public @java.lang.SuppressWarnings("all") BuilderJavadocBuilder basic(final int basic) { + public @java.lang.SuppressWarnings("all") BuilderJavadoc.BuilderJavadocBuilder basic(final int basic) { this.basic = basic; return this; } - public @java.lang.SuppressWarnings("all") BuilderJavadocBuilder getsetwith(final int getsetwith) { + public @java.lang.SuppressWarnings("all") BuilderJavadoc.BuilderJavadocBuilder getsetwith(final int getsetwith) { this.getsetwith = getsetwith; return this; } @@ -42,8 +42,8 @@ import java.util.List; this.predef = predef; this.predefWithJavadoc = predefWithJavadoc; } - public static @java.lang.SuppressWarnings("all") BuilderJavadocBuilder builder() { - return new BuilderJavadocBuilder(); + public static @java.lang.SuppressWarnings("all") BuilderJavadoc.BuilderJavadocBuilder builder() { + return new BuilderJavadoc.BuilderJavadocBuilder(); } public @java.lang.SuppressWarnings("all") int getGetsetwith() { return this.getsetwith; diff --git a/test/transform/resource/after-ecj/BuilderSimple.java b/test/transform/resource/after-ecj/BuilderSimple.java index 9d9fb7f3..e371f320 100644 --- a/test/transform/resource/after-ecj/BuilderSimple.java +++ b/test/transform/resource/after-ecj/BuilderSimple.java @@ -6,11 +6,11 @@ import java.util.List; @java.lang.SuppressWarnings("all") BuilderSimpleBuilder() { super(); } - public @java.lang.SuppressWarnings("all") BuilderSimpleBuilder yes(final int yes) { + public @java.lang.SuppressWarnings("all") BuilderSimple.BuilderSimpleBuilder yes(final int yes) { this.yes = yes; return this; } - public @java.lang.SuppressWarnings("all") BuilderSimpleBuilder also(final List also) { + public @java.lang.SuppressWarnings("all") BuilderSimple.BuilderSimpleBuilder also(final List also) { this.also = also; return this; } @@ -30,7 +30,7 @@ import java.util.List; this.yes = yes; this.also = also; } - protected static @java.lang.SuppressWarnings("all") BuilderSimpleBuilder builder() { - return new BuilderSimpleBuilder(); + protected static @java.lang.SuppressWarnings("all") BuilderSimple.BuilderSimpleBuilder builder() { + return new BuilderSimple.BuilderSimpleBuilder(); } } diff --git a/test/transform/resource/after-ecj/BuilderSimpleWithSetterPrefix.java b/test/transform/resource/after-ecj/BuilderSimpleWithSetterPrefix.java index 993c66da..d3ce4a46 100644 --- a/test/transform/resource/after-ecj/BuilderSimpleWithSetterPrefix.java +++ b/test/transform/resource/after-ecj/BuilderSimpleWithSetterPrefix.java @@ -5,7 +5,7 @@ import java.util.List; @java.lang.SuppressWarnings("all") BuilderSimpleWithSetterPrefixBuilder() { super(); } - public @java.lang.SuppressWarnings("all") BuilderSimpleWithSetterPrefixBuilder withUnprefixed(final int unprefixed) { + public @java.lang.SuppressWarnings("all") BuilderSimpleWithSetterPrefix.BuilderSimpleWithSetterPrefixBuilder withUnprefixed(final int unprefixed) { this.unprefixed = unprefixed; return this; } @@ -21,7 +21,7 @@ import java.util.List; super(); this.unprefixed = unprefixed; } - protected static @java.lang.SuppressWarnings("all") BuilderSimpleWithSetterPrefixBuilder builder() { - return new BuilderSimpleWithSetterPrefixBuilder(); + protected static @java.lang.SuppressWarnings("all") BuilderSimpleWithSetterPrefix.BuilderSimpleWithSetterPrefixBuilder builder() { + return new BuilderSimpleWithSetterPrefix.BuilderSimpleWithSetterPrefixBuilder(); } } diff --git a/test/transform/resource/after-ecj/BuilderSingularAnnotatedTypes.java b/test/transform/resource/after-ecj/BuilderSingularAnnotatedTypes.java index 511c153a..18c01c2e 100644 --- a/test/transform/resource/after-ecj/BuilderSingularAnnotatedTypes.java +++ b/test/transform/resource/after-ecj/BuilderSingularAnnotatedTypes.java @@ -14,7 +14,7 @@ import lombok.Singular; @java.lang.SuppressWarnings("all") BuilderSingularAnnotatedTypesBuilder() { super(); } - public @java.lang.SuppressWarnings("all") BuilderSingularAnnotatedTypesBuilder foo(final @MyAnnotation @NonNull String foo) { + public @java.lang.SuppressWarnings("all") BuilderSingularAnnotatedTypes.BuilderSingularAnnotatedTypesBuilder foo(final @MyAnnotation @NonNull String foo) { if ((foo == null)) { throw new java.lang.NullPointerException("foo is marked non-null but is null"); @@ -24,18 +24,18 @@ import lombok.Singular; this.foos.add(foo); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularAnnotatedTypesBuilder foos(final java.util.Collection foos) { + public @java.lang.SuppressWarnings("all") BuilderSingularAnnotatedTypes.BuilderSingularAnnotatedTypesBuilder foos(final java.util.Collection foos) { if ((this.foos == null)) this.foos = new java.util.ArrayList<@MyAnnotation @NonNull String>(); this.foos.addAll(foos); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularAnnotatedTypesBuilder clearFoos() { + public @java.lang.SuppressWarnings("all") BuilderSingularAnnotatedTypes.BuilderSingularAnnotatedTypesBuilder clearFoos() { if ((this.foos != null)) this.foos.clear(); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularAnnotatedTypesBuilder bar(final @MyAnnotation @NonNull String barKey, final @MyAnnotation @NonNull Integer barValue) { + public @java.lang.SuppressWarnings("all") BuilderSingularAnnotatedTypes.BuilderSingularAnnotatedTypesBuilder bar(final @MyAnnotation @NonNull String barKey, final @MyAnnotation @NonNull Integer barValue) { if ((barKey == null)) { throw new java.lang.NullPointerException("barKey is marked non-null but is null"); @@ -53,7 +53,7 @@ import lombok.Singular; this.bars$value.add(barValue); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularAnnotatedTypesBuilder bars(final java.util.Map bars) { + public @java.lang.SuppressWarnings("all") BuilderSingularAnnotatedTypes.BuilderSingularAnnotatedTypesBuilder bars(final java.util.Map bars) { if ((this.bars$key == null)) { this.bars$key = new java.util.ArrayList<@MyAnnotation @NonNull String>(); @@ -66,7 +66,7 @@ import lombok.Singular; } return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularAnnotatedTypesBuilder clearBars() { + public @java.lang.SuppressWarnings("all") BuilderSingularAnnotatedTypes.BuilderSingularAnnotatedTypesBuilder clearBars() { if ((this.bars$key != null)) { this.bars$key.clear(); @@ -115,7 +115,7 @@ import lombok.Singular; this.foos = foos; this.bars = bars; } - public static @java.lang.SuppressWarnings("all") BuilderSingularAnnotatedTypesBuilder builder() { - return new BuilderSingularAnnotatedTypesBuilder(); + public static @java.lang.SuppressWarnings("all") BuilderSingularAnnotatedTypes.BuilderSingularAnnotatedTypesBuilder builder() { + return new BuilderSingularAnnotatedTypes.BuilderSingularAnnotatedTypesBuilder(); } } \ No newline at end of file diff --git a/test/transform/resource/after-ecj/BuilderSingularAnnotatedTypesWithSetterPrefix.java b/test/transform/resource/after-ecj/BuilderSingularAnnotatedTypesWithSetterPrefix.java index c978ff40..20197f83 100644 --- a/test/transform/resource/after-ecj/BuilderSingularAnnotatedTypesWithSetterPrefix.java +++ b/test/transform/resource/after-ecj/BuilderSingularAnnotatedTypesWithSetterPrefix.java @@ -14,7 +14,7 @@ import lombok.Singular; @java.lang.SuppressWarnings("all") BuilderSingularAnnotatedTypesWithSetterPrefixBuilder() { super(); } - public @java.lang.SuppressWarnings("all") BuilderSingularAnnotatedTypesWithSetterPrefixBuilder withFoo(final @MyAnnotation @NonNull String foo) { + public @java.lang.SuppressWarnings("all") BuilderSingularAnnotatedTypesWithSetterPrefix.BuilderSingularAnnotatedTypesWithSetterPrefixBuilder withFoo(final @MyAnnotation @NonNull String foo) { if ((foo == null)) { throw new java.lang.NullPointerException("foo is marked non-null but is null"); @@ -24,18 +24,18 @@ import lombok.Singular; this.foos.add(foo); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularAnnotatedTypesWithSetterPrefixBuilder withFoos(final java.util.Collection foos) { + public @java.lang.SuppressWarnings("all") BuilderSingularAnnotatedTypesWithSetterPrefix.BuilderSingularAnnotatedTypesWithSetterPrefixBuilder withFoos(final java.util.Collection foos) { if ((this.foos == null)) this.foos = new java.util.ArrayList<@MyAnnotation @NonNull String>(); this.foos.addAll(foos); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularAnnotatedTypesWithSetterPrefixBuilder clearFoos() { + public @java.lang.SuppressWarnings("all") BuilderSingularAnnotatedTypesWithSetterPrefix.BuilderSingularAnnotatedTypesWithSetterPrefixBuilder clearFoos() { if ((this.foos != null)) this.foos.clear(); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularAnnotatedTypesWithSetterPrefixBuilder withBar(final @MyAnnotation @NonNull String barKey, final @MyAnnotation @NonNull Integer barValue) { + public @java.lang.SuppressWarnings("all") BuilderSingularAnnotatedTypesWithSetterPrefix.BuilderSingularAnnotatedTypesWithSetterPrefixBuilder withBar(final @MyAnnotation @NonNull String barKey, final @MyAnnotation @NonNull Integer barValue) { if ((barKey == null)) { throw new java.lang.NullPointerException("barKey is marked non-null but is null"); @@ -53,7 +53,7 @@ import lombok.Singular; this.bars$value.add(barValue); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularAnnotatedTypesWithSetterPrefixBuilder withBars(final java.util.Map bars) { + public @java.lang.SuppressWarnings("all") BuilderSingularAnnotatedTypesWithSetterPrefix.BuilderSingularAnnotatedTypesWithSetterPrefixBuilder withBars(final java.util.Map bars) { if ((this.bars$key == null)) { this.bars$key = new java.util.ArrayList<@MyAnnotation @NonNull String>(); @@ -66,7 +66,7 @@ import lombok.Singular; } return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularAnnotatedTypesWithSetterPrefixBuilder clearBars() { + public @java.lang.SuppressWarnings("all") BuilderSingularAnnotatedTypesWithSetterPrefix.BuilderSingularAnnotatedTypesWithSetterPrefixBuilder clearBars() { if ((this.bars$key != null)) { this.bars$key.clear(); @@ -115,7 +115,7 @@ import lombok.Singular; this.foos = foos; this.bars = bars; } - public static @java.lang.SuppressWarnings("all") BuilderSingularAnnotatedTypesWithSetterPrefixBuilder builder() { - return new BuilderSingularAnnotatedTypesWithSetterPrefixBuilder(); + public static @java.lang.SuppressWarnings("all") BuilderSingularAnnotatedTypesWithSetterPrefix.BuilderSingularAnnotatedTypesWithSetterPrefixBuilder builder() { + return new BuilderSingularAnnotatedTypesWithSetterPrefix.BuilderSingularAnnotatedTypesWithSetterPrefixBuilder(); } } diff --git a/test/transform/resource/after-ecj/BuilderSingularGuavaListsSets.java b/test/transform/resource/after-ecj/BuilderSingularGuavaListsSets.java index 9b50d33b..88a3096f 100644 --- a/test/transform/resource/after-ecj/BuilderSingularGuavaListsSets.java +++ b/test/transform/resource/after-ecj/BuilderSingularGuavaListsSets.java @@ -14,83 +14,83 @@ import lombok.Singular; @java.lang.SuppressWarnings("all") BuilderSingularGuavaListsSetsBuilder() { super(); } - public @java.lang.SuppressWarnings("all") BuilderSingularGuavaListsSetsBuilder card(final T card) { + public @java.lang.SuppressWarnings("all") BuilderSingularGuavaListsSets.BuilderSingularGuavaListsSetsBuilder card(final T card) { if ((this.cards == null)) this.cards = com.google.common.collect.ImmutableList.builder(); this.cards.add(card); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularGuavaListsSetsBuilder cards(final java.lang.Iterable cards) { + public @java.lang.SuppressWarnings("all") BuilderSingularGuavaListsSets.BuilderSingularGuavaListsSetsBuilder cards(final java.lang.Iterable cards) { if ((this.cards == null)) this.cards = com.google.common.collect.ImmutableList.builder(); this.cards.addAll(cards); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularGuavaListsSetsBuilder clearCards() { + public @java.lang.SuppressWarnings("all") BuilderSingularGuavaListsSets.BuilderSingularGuavaListsSetsBuilder clearCards() { this.cards = null; return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularGuavaListsSetsBuilder frog(final Number frog) { + public @java.lang.SuppressWarnings("all") BuilderSingularGuavaListsSets.BuilderSingularGuavaListsSetsBuilder frog(final Number frog) { if ((this.frogs == null)) this.frogs = com.google.common.collect.ImmutableList.builder(); this.frogs.add(frog); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularGuavaListsSetsBuilder frogs(final java.lang.Iterable frogs) { + public @java.lang.SuppressWarnings("all") BuilderSingularGuavaListsSets.BuilderSingularGuavaListsSetsBuilder frogs(final java.lang.Iterable frogs) { if ((this.frogs == null)) this.frogs = com.google.common.collect.ImmutableList.builder(); this.frogs.addAll(frogs); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularGuavaListsSetsBuilder clearFrogs() { + public @java.lang.SuppressWarnings("all") BuilderSingularGuavaListsSets.BuilderSingularGuavaListsSetsBuilder clearFrogs() { this.frogs = null; return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularGuavaListsSetsBuilder rawSet(final java.lang.Object rawSet) { + public @java.lang.SuppressWarnings("all") BuilderSingularGuavaListsSets.BuilderSingularGuavaListsSetsBuilder rawSet(final java.lang.Object rawSet) { if ((this.rawSet == null)) this.rawSet = com.google.common.collect.ImmutableSet.builder(); this.rawSet.add(rawSet); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularGuavaListsSetsBuilder rawSet(final java.lang.Iterable rawSet) { + public @java.lang.SuppressWarnings("all") BuilderSingularGuavaListsSets.BuilderSingularGuavaListsSetsBuilder rawSet(final java.lang.Iterable rawSet) { if ((this.rawSet == null)) this.rawSet = com.google.common.collect.ImmutableSet.builder(); this.rawSet.addAll(rawSet); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularGuavaListsSetsBuilder clearRawSet() { + public @java.lang.SuppressWarnings("all") BuilderSingularGuavaListsSets.BuilderSingularGuavaListsSetsBuilder clearRawSet() { this.rawSet = null; return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularGuavaListsSetsBuilder pass(final String pass) { + public @java.lang.SuppressWarnings("all") BuilderSingularGuavaListsSets.BuilderSingularGuavaListsSetsBuilder pass(final String pass) { if ((this.passes == null)) this.passes = com.google.common.collect.ImmutableSortedSet.naturalOrder(); this.passes.add(pass); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularGuavaListsSetsBuilder passes(final java.lang.Iterable passes) { + public @java.lang.SuppressWarnings("all") BuilderSingularGuavaListsSets.BuilderSingularGuavaListsSetsBuilder passes(final java.lang.Iterable passes) { if ((this.passes == null)) this.passes = com.google.common.collect.ImmutableSortedSet.naturalOrder(); this.passes.addAll(passes); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularGuavaListsSetsBuilder clearPasses() { + public @java.lang.SuppressWarnings("all") BuilderSingularGuavaListsSets.BuilderSingularGuavaListsSetsBuilder clearPasses() { this.passes = null; return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularGuavaListsSetsBuilder user(final Number rowKey, final Number columnKey, final String value) { + public @java.lang.SuppressWarnings("all") BuilderSingularGuavaListsSets.BuilderSingularGuavaListsSetsBuilder user(final Number rowKey, final Number columnKey, final String value) { if ((this.users == null)) this.users = com.google.common.collect.ImmutableTable.builder(); this.users.put(rowKey, columnKey, value); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularGuavaListsSetsBuilder users(final com.google.common.collect.Table users) { + public @java.lang.SuppressWarnings("all") BuilderSingularGuavaListsSets.BuilderSingularGuavaListsSetsBuilder users(final com.google.common.collect.Table users) { if ((this.users == null)) this.users = com.google.common.collect.ImmutableTable.builder(); this.users.putAll(users); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularGuavaListsSetsBuilder clearUsers() { + public @java.lang.SuppressWarnings("all") BuilderSingularGuavaListsSets.BuilderSingularGuavaListsSetsBuilder clearUsers() { this.users = null; return this; } @@ -119,7 +119,7 @@ import lombok.Singular; this.passes = passes; this.users = users; } - public static @java.lang.SuppressWarnings("all") BuilderSingularGuavaListsSetsBuilder builder() { - return new BuilderSingularGuavaListsSetsBuilder(); + public static @java.lang.SuppressWarnings("all") BuilderSingularGuavaListsSets.BuilderSingularGuavaListsSetsBuilder builder() { + return new BuilderSingularGuavaListsSets.BuilderSingularGuavaListsSetsBuilder(); } } diff --git a/test/transform/resource/after-ecj/BuilderSingularGuavaListsSetsWithSetterPrefix.java b/test/transform/resource/after-ecj/BuilderSingularGuavaListsSetsWithSetterPrefix.java deleted file mode 100644 index ec700874..00000000 --- a/test/transform/resource/after-ecj/BuilderSingularGuavaListsSetsWithSetterPrefix.java +++ /dev/null @@ -1,125 +0,0 @@ -import com.google.common.collect.ImmutableList; -import com.google.common.collect.ImmutableCollection; -import com.google.common.collect.ImmutableSet; -import com.google.common.collect.ImmutableSortedSet; -import com.google.common.collect.ImmutableTable; -import lombok.Singular; -@lombok.Builder(setterPrefix = "with") class BuilderSingularGuavaListsSetsWithSetterPrefix { - public static @java.lang.SuppressWarnings("all") class BuilderSingularGuavaListsSetsWithSetterPrefixBuilder { - private @java.lang.SuppressWarnings("all") com.google.common.collect.ImmutableList.Builder cards; - private @java.lang.SuppressWarnings("all") com.google.common.collect.ImmutableList.Builder frogs; - private @java.lang.SuppressWarnings("all") com.google.common.collect.ImmutableSet.Builder rawSet; - private @java.lang.SuppressWarnings("all") com.google.common.collect.ImmutableSortedSet.Builder passes; - private @java.lang.SuppressWarnings("all") com.google.common.collect.ImmutableTable.Builder users; - @java.lang.SuppressWarnings("all") BuilderSingularGuavaListsSetsWithSetterPrefixBuilder() { - super(); - } - public @java.lang.SuppressWarnings("all") BuilderSingularGuavaListsSetsWithSetterPrefixBuilder withCard(final T card) { - if ((this.cards == null)) - this.cards = com.google.common.collect.ImmutableList.builder(); - this.cards.add(card); - return this; - } - public @java.lang.SuppressWarnings("all") BuilderSingularGuavaListsSetsWithSetterPrefixBuilder withCards(final java.lang.Iterable cards) { - if ((this.cards == null)) - this.cards = com.google.common.collect.ImmutableList.builder(); - this.cards.addAll(cards); - return this; - } - public @java.lang.SuppressWarnings("all") BuilderSingularGuavaListsSetsWithSetterPrefixBuilder clearCards() { - this.cards = null; - return this; - } - public @java.lang.SuppressWarnings("all") BuilderSingularGuavaListsSetsWithSetterPrefixBuilder withFrog(final Number frog) { - if ((this.frogs == null)) - this.frogs = com.google.common.collect.ImmutableList.builder(); - this.frogs.add(frog); - return this; - } - public @java.lang.SuppressWarnings("all") BuilderSingularGuavaListsSetsWithSetterPrefixBuilder withFrogs(final java.lang.Iterable frogs) { - if ((this.frogs == null)) - this.frogs = com.google.common.collect.ImmutableList.builder(); - this.frogs.addAll(frogs); - return this; - } - public @java.lang.SuppressWarnings("all") BuilderSingularGuavaListsSetsWithSetterPrefixBuilder clearFrogs() { - this.frogs = null; - return this; - } - public @java.lang.SuppressWarnings("all") BuilderSingularGuavaListsSetsWithSetterPrefixBuilder withRawSet(final java.lang.Object rawSet) { - if ((this.rawSet == null)) - this.rawSet = com.google.common.collect.ImmutableSet.builder(); - this.rawSet.add(rawSet); - return this; - } - public @java.lang.SuppressWarnings("all") BuilderSingularGuavaListsSetsWithSetterPrefixBuilder withRawSet(final java.lang.Iterable rawSet) { - if ((this.rawSet == null)) - this.rawSet = com.google.common.collect.ImmutableSet.builder(); - this.rawSet.addAll(rawSet); - return this; - } - public @java.lang.SuppressWarnings("all") BuilderSingularGuavaListsSetsWithSetterPrefixBuilder clearRawSet() { - this.rawSet = null; - return this; - } - public @java.lang.SuppressWarnings("all") BuilderSingularGuavaListsSetsWithSetterPrefixBuilder withPass(final String pass) { - if ((this.passes == null)) - this.passes = com.google.common.collect.ImmutableSortedSet.naturalOrder(); - this.passes.add(pass); - return this; - } - public @java.lang.SuppressWarnings("all") BuilderSingularGuavaListsSetsWithSetterPrefixBuilder withPasses(final java.lang.Iterable passes) { - if ((this.passes == null)) - this.passes = com.google.common.collect.ImmutableSortedSet.naturalOrder(); - this.passes.addAll(passes); - return this; - } - public @java.lang.SuppressWarnings("all") BuilderSingularGuavaListsSetsWithSetterPrefixBuilder clearPasses() { - this.passes = null; - return this; - } - public @java.lang.SuppressWarnings("all") BuilderSingularGuavaListsSetsWithSetterPrefixBuilder withUser(final Number rowKey, final Number columnKey, final String value) { - if ((this.users == null)) - this.users = com.google.common.collect.ImmutableTable.builder(); - this.users.put(rowKey, columnKey, value); - return this; - } - public @java.lang.SuppressWarnings("all") BuilderSingularGuavaListsSetsWithSetterPrefixBuilder withUsers(final com.google.common.collect.Table users) { - if ((this.users == null)) - this.users = com.google.common.collect.ImmutableTable.builder(); - this.users.putAll(users); - return this; - } - public @java.lang.SuppressWarnings("all") BuilderSingularGuavaListsSetsWithSetterPrefixBuilder clearUsers() { - this.users = null; - return this; - } - public @java.lang.SuppressWarnings("all") BuilderSingularGuavaListsSetsWithSetterPrefix build() { - com.google.common.collect.ImmutableList cards = ((this.cards == null) ? com.google.common.collect.ImmutableList.of() : this.cards.build()); - com.google.common.collect.ImmutableCollection frogs = ((this.frogs == null) ? com.google.common.collect.ImmutableList.of() : this.frogs.build()); - com.google.common.collect.ImmutableSet rawSet = ((this.rawSet == null) ? com.google.common.collect.ImmutableSet.of() : this.rawSet.build()); - com.google.common.collect.ImmutableSortedSet passes = ((this.passes == null) ? com.google.common.collect.ImmutableSortedSet.of() : this.passes.build()); - com.google.common.collect.ImmutableTable users = ((this.users == null) ? com.google.common.collect.ImmutableTable.of() : this.users.build()); - return new BuilderSingularGuavaListsSetsWithSetterPrefix(cards, frogs, rawSet, passes, users); - } - public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { - return (((((((((("BuilderSingularGuavaListsSetsWithSetterPrefix.BuilderSingularGuavaListsSetsWithSetterPrefixBuilder(cards=" + this.cards) + ", frogs=") + this.frogs) + ", rawSet=") + this.rawSet) + ", passes=") + this.passes) + ", users=") + this.users) + ")"); - } - } - private @Singular ImmutableList cards; - private @Singular ImmutableCollection frogs; - private @SuppressWarnings("all") @Singular("rawSet") ImmutableSet rawSet; - private @Singular ImmutableSortedSet passes; - private @Singular ImmutableTable users; - @java.lang.SuppressWarnings("all") BuilderSingularGuavaListsSetsWithSetterPrefix(final ImmutableList cards, final ImmutableCollection frogs, final ImmutableSet rawSet, final ImmutableSortedSet passes, final ImmutableTable users) { - super(); - this.cards = cards; - this.frogs = frogs; - this.rawSet = rawSet; - this.passes = passes; - this.users = users; - } - public static @java.lang.SuppressWarnings("all") BuilderSingularGuavaListsSetsWithSetterPrefixBuilder builder() { - return new BuilderSingularGuavaListsSetsWithSetterPrefixBuilder(); - } -} diff --git a/test/transform/resource/after-ecj/BuilderSingularGuavaMaps.java b/test/transform/resource/after-ecj/BuilderSingularGuavaMaps.java index 1dc04a07..618ee8db 100644 --- a/test/transform/resource/after-ecj/BuilderSingularGuavaMaps.java +++ b/test/transform/resource/after-ecj/BuilderSingularGuavaMaps.java @@ -10,51 +10,51 @@ import lombok.Singular; @java.lang.SuppressWarnings("all") BuilderSingularGuavaMapsBuilder() { super(); } - public @java.lang.SuppressWarnings("all") BuilderSingularGuavaMapsBuilder battleaxe(final K key, final V value) { + public @java.lang.SuppressWarnings("all") BuilderSingularGuavaMaps.BuilderSingularGuavaMapsBuilder battleaxe(final K key, final V value) { if ((this.battleaxes == null)) this.battleaxes = com.google.common.collect.ImmutableMap.builder(); this.battleaxes.put(key, value); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularGuavaMapsBuilder battleaxes(final java.util.Map battleaxes) { + public @java.lang.SuppressWarnings("all") BuilderSingularGuavaMaps.BuilderSingularGuavaMapsBuilder battleaxes(final java.util.Map battleaxes) { if ((this.battleaxes == null)) this.battleaxes = com.google.common.collect.ImmutableMap.builder(); this.battleaxes.putAll(battleaxes); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularGuavaMapsBuilder clearBattleaxes() { + public @java.lang.SuppressWarnings("all") BuilderSingularGuavaMaps.BuilderSingularGuavaMapsBuilder clearBattleaxes() { this.battleaxes = null; return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularGuavaMapsBuilder vertex(final Integer key, final V value) { + public @java.lang.SuppressWarnings("all") BuilderSingularGuavaMaps.BuilderSingularGuavaMapsBuilder vertex(final Integer key, final V value) { if ((this.vertices == null)) this.vertices = com.google.common.collect.ImmutableSortedMap.naturalOrder(); this.vertices.put(key, value); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularGuavaMapsBuilder vertices(final java.util.Map vertices) { + public @java.lang.SuppressWarnings("all") BuilderSingularGuavaMaps.BuilderSingularGuavaMapsBuilder vertices(final java.util.Map vertices) { if ((this.vertices == null)) this.vertices = com.google.common.collect.ImmutableSortedMap.naturalOrder(); this.vertices.putAll(vertices); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularGuavaMapsBuilder clearVertices() { + public @java.lang.SuppressWarnings("all") BuilderSingularGuavaMaps.BuilderSingularGuavaMapsBuilder clearVertices() { this.vertices = null; return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularGuavaMapsBuilder rawMap(final java.lang.Object key, final java.lang.Object value) { + public @java.lang.SuppressWarnings("all") BuilderSingularGuavaMaps.BuilderSingularGuavaMapsBuilder rawMap(final java.lang.Object key, final java.lang.Object value) { if ((this.rawMap == null)) this.rawMap = com.google.common.collect.ImmutableBiMap.builder(); this.rawMap.put(key, value); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularGuavaMapsBuilder rawMap(final java.util.Map rawMap) { + public @java.lang.SuppressWarnings("all") BuilderSingularGuavaMaps.BuilderSingularGuavaMapsBuilder rawMap(final java.util.Map rawMap) { if ((this.rawMap == null)) this.rawMap = com.google.common.collect.ImmutableBiMap.builder(); this.rawMap.putAll(rawMap); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularGuavaMapsBuilder clearRawMap() { + public @java.lang.SuppressWarnings("all") BuilderSingularGuavaMaps.BuilderSingularGuavaMapsBuilder clearRawMap() { this.rawMap = null; return this; } @@ -77,7 +77,7 @@ import lombok.Singular; this.vertices = vertices; this.rawMap = rawMap; } - public static @java.lang.SuppressWarnings("all") BuilderSingularGuavaMapsBuilder builder() { - return new BuilderSingularGuavaMapsBuilder(); + public static @java.lang.SuppressWarnings("all") BuilderSingularGuavaMaps.BuilderSingularGuavaMapsBuilder builder() { + return new BuilderSingularGuavaMaps.BuilderSingularGuavaMapsBuilder(); } } diff --git a/test/transform/resource/after-ecj/BuilderSingularGuavaMapsWithSetterPrefix.java b/test/transform/resource/after-ecj/BuilderSingularGuavaMapsWithSetterPrefix.java deleted file mode 100644 index 0f58f7a4..00000000 --- a/test/transform/resource/after-ecj/BuilderSingularGuavaMapsWithSetterPrefix.java +++ /dev/null @@ -1,83 +0,0 @@ -import com.google.common.collect.ImmutableMap; -import com.google.common.collect.ImmutableBiMap; -import com.google.common.collect.ImmutableSortedMap; -import lombok.Singular; -@lombok.Builder(setterPrefix = "with") class BuilderSingularGuavaMapsWithSetterPrefix { - public static @java.lang.SuppressWarnings("all") class BuilderSingularGuavaMapsWithSetterPrefixBuilder { - private @java.lang.SuppressWarnings("all") com.google.common.collect.ImmutableMap.Builder battleaxes; - private @java.lang.SuppressWarnings("all") com.google.common.collect.ImmutableSortedMap.Builder vertices; - private @java.lang.SuppressWarnings("all") com.google.common.collect.ImmutableBiMap.Builder rawMap; - @java.lang.SuppressWarnings("all") BuilderSingularGuavaMapsWithSetterPrefixBuilder() { - super(); - } - public @java.lang.SuppressWarnings("all") BuilderSingularGuavaMapsWithSetterPrefixBuilder withBattleaxe(final K key, final V value) { - if ((this.battleaxes == null)) - this.battleaxes = com.google.common.collect.ImmutableMap.builder(); - this.battleaxes.put(key, value); - return this; - } - public @java.lang.SuppressWarnings("all") BuilderSingularGuavaMapsWithSetterPrefixBuilder withBattleaxes(final java.util.Map battleaxes) { - if ((this.battleaxes == null)) - this.battleaxes = com.google.common.collect.ImmutableMap.builder(); - this.battleaxes.putAll(battleaxes); - return this; - } - public @java.lang.SuppressWarnings("all") BuilderSingularGuavaMapsWithSetterPrefixBuilder clearBattleaxes() { - this.battleaxes = null; - return this; - } - public @java.lang.SuppressWarnings("all") BuilderSingularGuavaMapsWithSetterPrefixBuilder withVertex(final Integer key, final V value) { - if ((this.vertices == null)) - this.vertices = com.google.common.collect.ImmutableSortedMap.naturalOrder(); - this.vertices.put(key, value); - return this; - } - public @java.lang.SuppressWarnings("all") BuilderSingularGuavaMapsWithSetterPrefixBuilder withVertices(final java.util.Map vertices) { - if ((this.vertices == null)) - this.vertices = com.google.common.collect.ImmutableSortedMap.naturalOrder(); - this.vertices.putAll(vertices); - return this; - } - public @java.lang.SuppressWarnings("all") BuilderSingularGuavaMapsWithSetterPrefixBuilder clearVertices() { - this.vertices = null; - return this; - } - public @java.lang.SuppressWarnings("all") BuilderSingularGuavaMapsWithSetterPrefixBuilder withRawMap(final java.lang.Object key, final java.lang.Object value) { - if ((this.rawMap == null)) - this.rawMap = com.google.common.collect.ImmutableBiMap.builder(); - this.rawMap.put(key, value); - return this; - } - public @java.lang.SuppressWarnings("all") BuilderSingularGuavaMapsWithSetterPrefixBuilder withRawMap(final java.util.Map rawMap) { - if ((this.rawMap == null)) - this.rawMap = com.google.common.collect.ImmutableBiMap.builder(); - this.rawMap.putAll(rawMap); - return this; - } - public @java.lang.SuppressWarnings("all") BuilderSingularGuavaMapsWithSetterPrefixBuilder clearRawMap() { - this.rawMap = null; - return this; - } - public @java.lang.SuppressWarnings("all") BuilderSingularGuavaMapsWithSetterPrefix build() { - com.google.common.collect.ImmutableMap battleaxes = ((this.battleaxes == null) ? com.google.common.collect.ImmutableMap.of() : this.battleaxes.build()); - com.google.common.collect.ImmutableSortedMap vertices = ((this.vertices == null) ? com.google.common.collect.ImmutableSortedMap.of() : this.vertices.build()); - com.google.common.collect.ImmutableBiMap rawMap = ((this.rawMap == null) ? com.google.common.collect.ImmutableBiMap.of() : this.rawMap.build()); - return new BuilderSingularGuavaMapsWithSetterPrefix(battleaxes, vertices, rawMap); - } - public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { - return (((((("BuilderSingularGuavaMapsWithSetterPrefix.BuilderSingularGuavaMapsWithSetterPrefixBuilder(battleaxes=" + this.battleaxes) + ", vertices=") + this.vertices) + ", rawMap=") + this.rawMap) + ")"); - } - } - private @Singular ImmutableMap battleaxes; - private @Singular ImmutableSortedMap vertices; - private @SuppressWarnings("all") @Singular("rawMap") ImmutableBiMap rawMap; - @java.lang.SuppressWarnings("all") BuilderSingularGuavaMapsWithSetterPrefix(final ImmutableMap battleaxes, final ImmutableSortedMap vertices, final ImmutableBiMap rawMap) { - super(); - this.battleaxes = battleaxes; - this.vertices = vertices; - this.rawMap = rawMap; - } - public static @java.lang.SuppressWarnings("all") BuilderSingularGuavaMapsWithSetterPrefixBuilder builder() { - return new BuilderSingularGuavaMapsWithSetterPrefixBuilder(); - } -} diff --git a/test/transform/resource/after-ecj/BuilderSingularLists.java b/test/transform/resource/after-ecj/BuilderSingularLists.java index 5bb13bad..66247c3f 100644 --- a/test/transform/resource/after-ecj/BuilderSingularLists.java +++ b/test/transform/resource/after-ecj/BuilderSingularLists.java @@ -10,53 +10,53 @@ import lombok.Singular; @java.lang.SuppressWarnings("all") BuilderSingularListsBuilder() { super(); } - public @java.lang.SuppressWarnings("all") BuilderSingularListsBuilder child(final T child) { + public @java.lang.SuppressWarnings("all") BuilderSingularLists.BuilderSingularListsBuilder child(final T child) { if ((this.children == null)) this.children = new java.util.ArrayList(); this.children.add(child); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularListsBuilder children(final java.util.Collection children) { + public @java.lang.SuppressWarnings("all") BuilderSingularLists.BuilderSingularListsBuilder children(final java.util.Collection children) { if ((this.children == null)) this.children = new java.util.ArrayList(); this.children.addAll(children); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularListsBuilder clearChildren() { + public @java.lang.SuppressWarnings("all") BuilderSingularLists.BuilderSingularListsBuilder clearChildren() { if ((this.children != null)) this.children.clear(); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularListsBuilder scarf(final Number scarf) { + public @java.lang.SuppressWarnings("all") BuilderSingularLists.BuilderSingularListsBuilder scarf(final Number scarf) { if ((this.scarves == null)) this.scarves = new java.util.ArrayList(); this.scarves.add(scarf); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularListsBuilder scarves(final java.util.Collection scarves) { + public @java.lang.SuppressWarnings("all") BuilderSingularLists.BuilderSingularListsBuilder scarves(final java.util.Collection scarves) { if ((this.scarves == null)) this.scarves = new java.util.ArrayList(); this.scarves.addAll(scarves); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularListsBuilder clearScarves() { + public @java.lang.SuppressWarnings("all") BuilderSingularLists.BuilderSingularListsBuilder clearScarves() { if ((this.scarves != null)) this.scarves.clear(); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularListsBuilder rawList(final java.lang.Object rawList) { + public @java.lang.SuppressWarnings("all") BuilderSingularLists.BuilderSingularListsBuilder rawList(final java.lang.Object rawList) { if ((this.rawList == null)) this.rawList = new java.util.ArrayList(); this.rawList.add(rawList); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularListsBuilder rawList(final java.util.Collection rawList) { + public @java.lang.SuppressWarnings("all") BuilderSingularLists.BuilderSingularListsBuilder rawList(final java.util.Collection rawList) { if ((this.rawList == null)) this.rawList = new java.util.ArrayList(); this.rawList.addAll(rawList); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularListsBuilder clearRawList() { + public @java.lang.SuppressWarnings("all") BuilderSingularLists.BuilderSingularListsBuilder clearRawList() { if ((this.rawList != null)) this.rawList.clear(); return this; @@ -110,7 +110,7 @@ import lombok.Singular; this.scarves = scarves; this.rawList = rawList; } - public static @java.lang.SuppressWarnings("all") BuilderSingularListsBuilder builder() { - return new BuilderSingularListsBuilder(); + public static @java.lang.SuppressWarnings("all") BuilderSingularLists.BuilderSingularListsBuilder builder() { + return new BuilderSingularLists.BuilderSingularListsBuilder(); } } \ No newline at end of file diff --git a/test/transform/resource/after-ecj/BuilderSingularListsWithSetterPrefix.java b/test/transform/resource/after-ecj/BuilderSingularListsWithSetterPrefix.java deleted file mode 100644 index ab90cb48..00000000 --- a/test/transform/resource/after-ecj/BuilderSingularListsWithSetterPrefix.java +++ /dev/null @@ -1,116 +0,0 @@ -import java.util.List; -import java.util.Collection; - -import lombok.Singular; -@lombok.Builder(setterPrefix = "with") class BuilderSingularListsWithSetterPrefix { - public static @java.lang.SuppressWarnings("all") class BuilderSingularListsWithSetterPrefixBuilder { - private @java.lang.SuppressWarnings("all") java.util.ArrayList children; - private @java.lang.SuppressWarnings("all") java.util.ArrayList scarves; - private @java.lang.SuppressWarnings("all") java.util.ArrayList rawList; - @java.lang.SuppressWarnings("all") BuilderSingularListsWithSetterPrefixBuilder() { - super(); - } - public @java.lang.SuppressWarnings("all") BuilderSingularListsWithSetterPrefixBuilder withChild(final T child) { - if ((this.children == null)) - this.children = new java.util.ArrayList(); - this.children.add(child); - return this; - } - public @java.lang.SuppressWarnings("all") BuilderSingularListsWithSetterPrefixBuilder withChildren(final java.util.Collection children) { - if ((this.children == null)) - this.children = new java.util.ArrayList(); - this.children.addAll(children); - return this; - } - public @java.lang.SuppressWarnings("all") BuilderSingularListsWithSetterPrefixBuilder clearChildren() { - if ((this.children != null)) - this.children.clear(); - return this; - } - public @java.lang.SuppressWarnings("all") BuilderSingularListsWithSetterPrefixBuilder withScarf(final Number scarf) { - if ((this.scarves == null)) - this.scarves = new java.util.ArrayList(); - this.scarves.add(scarf); - return this; - } - public @java.lang.SuppressWarnings("all") BuilderSingularListsWithSetterPrefixBuilder withScarves(final java.util.Collection scarves) { - if ((this.scarves == null)) - this.scarves = new java.util.ArrayList(); - this.scarves.addAll(scarves); - return this; - } - public @java.lang.SuppressWarnings("all") BuilderSingularListsWithSetterPrefixBuilder clearScarves() { - if ((this.scarves != null)) - this.scarves.clear(); - return this; - } - public @java.lang.SuppressWarnings("all") BuilderSingularListsWithSetterPrefixBuilder withRawList(final java.lang.Object rawList) { - if ((this.rawList == null)) - this.rawList = new java.util.ArrayList(); - this.rawList.add(rawList); - return this; - } - public @java.lang.SuppressWarnings("all") BuilderSingularListsWithSetterPrefixBuilder withRawList(final java.util.Collection rawList) { - if ((this.rawList == null)) - this.rawList = new java.util.ArrayList(); - this.rawList.addAll(rawList); - return this; - } - public @java.lang.SuppressWarnings("all") BuilderSingularListsWithSetterPrefixBuilder clearRawList() { - if ((this.rawList != null)) - this.rawList.clear(); - return this; - } - public @java.lang.SuppressWarnings("all") BuilderSingularListsWithSetterPrefix build() { - java.util.List children; - switch (((this.children == null) ? 0 : this.children.size())) { - case 0 : - children = java.util.Collections.emptyList(); - break; - case 1 : - children = java.util.Collections.singletonList(this.children.get(0)); - break; - default : - children = java.util.Collections.unmodifiableList(new java.util.ArrayList(this.children)); - } - java.util.Collection scarves; - switch (((this.scarves == null) ? 0 : this.scarves.size())) { - case 0 : - scarves = java.util.Collections.emptyList(); - break; - case 1 : - scarves = java.util.Collections.singletonList(this.scarves.get(0)); - break; - default : - scarves = java.util.Collections.unmodifiableList(new java.util.ArrayList(this.scarves)); - } - java.util.List rawList; - switch (((this.rawList == null) ? 0 : this.rawList.size())) { - case 0 : - rawList = java.util.Collections.emptyList(); - break; - case 1 : - rawList = java.util.Collections.singletonList(this.rawList.get(0)); - break; - default : - rawList = java.util.Collections.unmodifiableList(new java.util.ArrayList(this.rawList)); - } - return new BuilderSingularListsWithSetterPrefix(children, scarves, rawList); - } - public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { - return (((((("BuilderSingularListsWithSetterPrefix.BuilderSingularListsWithSetterPrefixBuilder(children=" + this.children) + ", scarves=") + this.scarves) + ", rawList=") + this.rawList) + ")"); - } - } - private @Singular List children; - private @Singular Collection scarves; - private @SuppressWarnings("all") @Singular("rawList") List rawList; - @java.lang.SuppressWarnings("all") BuilderSingularListsWithSetterPrefix(final List children, final Collection scarves, final List rawList) { - super(); - this.children = children; - this.scarves = scarves; - this.rawList = rawList; - } - public static @java.lang.SuppressWarnings("all") BuilderSingularListsWithSetterPrefixBuilder builder() { - return new BuilderSingularListsWithSetterPrefixBuilder(); - } -} diff --git a/test/transform/resource/after-ecj/BuilderSingularMaps.java b/test/transform/resource/after-ecj/BuilderSingularMaps.java index 20945a13..977ee527 100644 --- a/test/transform/resource/after-ecj/BuilderSingularMaps.java +++ b/test/transform/resource/after-ecj/BuilderSingularMaps.java @@ -14,7 +14,7 @@ import lombok.Singular; @java.lang.SuppressWarnings("all") BuilderSingularMapsBuilder() { super(); } - public @java.lang.SuppressWarnings("all") BuilderSingularMapsBuilder woman(final K womanKey, final V womanValue) { + public @java.lang.SuppressWarnings("all") BuilderSingularMaps.BuilderSingularMapsBuilder woman(final K womanKey, final V womanValue) { if ((this.women$key == null)) { this.women$key = new java.util.ArrayList(); @@ -24,7 +24,7 @@ import lombok.Singular; this.women$value.add(womanValue); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularMapsBuilder women(final java.util.Map women) { + public @java.lang.SuppressWarnings("all") BuilderSingularMaps.BuilderSingularMapsBuilder women(final java.util.Map women) { if ((this.women$key == null)) { this.women$key = new java.util.ArrayList(); @@ -37,7 +37,7 @@ import lombok.Singular; } return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularMapsBuilder clearWomen() { + public @java.lang.SuppressWarnings("all") BuilderSingularMaps.BuilderSingularMapsBuilder clearWomen() { if ((this.women$key != null)) { this.women$key.clear(); @@ -45,7 +45,7 @@ import lombok.Singular; } return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularMapsBuilder man(final K manKey, final Number manValue) { + public @java.lang.SuppressWarnings("all") BuilderSingularMaps.BuilderSingularMapsBuilder man(final K manKey, final Number manValue) { if ((this.men$key == null)) { this.men$key = new java.util.ArrayList(); @@ -55,7 +55,7 @@ import lombok.Singular; this.men$value.add(manValue); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularMapsBuilder men(final java.util.Map men) { + public @java.lang.SuppressWarnings("all") BuilderSingularMaps.BuilderSingularMapsBuilder men(final java.util.Map men) { if ((this.men$key == null)) { this.men$key = new java.util.ArrayList(); @@ -68,7 +68,7 @@ import lombok.Singular; } return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularMapsBuilder clearMen() { + public @java.lang.SuppressWarnings("all") BuilderSingularMaps.BuilderSingularMapsBuilder clearMen() { if ((this.men$key != null)) { this.men$key.clear(); @@ -76,7 +76,7 @@ import lombok.Singular; } return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularMapsBuilder rawMap(final java.lang.Object rawMapKey, final java.lang.Object rawMapValue) { + public @java.lang.SuppressWarnings("all") BuilderSingularMaps.BuilderSingularMapsBuilder rawMap(final java.lang.Object rawMapKey, final java.lang.Object rawMapValue) { if ((this.rawMap$key == null)) { this.rawMap$key = new java.util.ArrayList(); @@ -86,7 +86,7 @@ import lombok.Singular; this.rawMap$value.add(rawMapValue); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularMapsBuilder rawMap(final java.util.Map rawMap) { + public @java.lang.SuppressWarnings("all") BuilderSingularMaps.BuilderSingularMapsBuilder rawMap(final java.util.Map rawMap) { if ((this.rawMap$key == null)) { this.rawMap$key = new java.util.ArrayList(); @@ -99,7 +99,7 @@ import lombok.Singular; } return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularMapsBuilder clearRawMap() { + public @java.lang.SuppressWarnings("all") BuilderSingularMaps.BuilderSingularMapsBuilder clearRawMap() { if ((this.rawMap$key != null)) { this.rawMap$key.clear(); @@ -107,7 +107,7 @@ import lombok.Singular; } return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularMapsBuilder stringMap(final String stringMapKey, final V stringMapValue) { + public @java.lang.SuppressWarnings("all") BuilderSingularMaps.BuilderSingularMapsBuilder stringMap(final String stringMapKey, final V stringMapValue) { if ((this.stringMap$key == null)) { this.stringMap$key = new java.util.ArrayList(); @@ -117,7 +117,7 @@ import lombok.Singular; this.stringMap$value.add(stringMapValue); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularMapsBuilder stringMap(final java.util.Map stringMap) { + public @java.lang.SuppressWarnings("all") BuilderSingularMaps.BuilderSingularMapsBuilder stringMap(final java.util.Map stringMap) { if ((this.stringMap$key == null)) { this.stringMap$key = new java.util.ArrayList(); @@ -130,7 +130,7 @@ import lombok.Singular; } return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularMapsBuilder clearStringMap() { + public @java.lang.SuppressWarnings("all") BuilderSingularMaps.BuilderSingularMapsBuilder clearStringMap() { if ((this.stringMap$key != null)) { this.stringMap$key.clear(); @@ -203,7 +203,7 @@ import lombok.Singular; this.rawMap = rawMap; this.stringMap = stringMap; } - public static @java.lang.SuppressWarnings("all") BuilderSingularMapsBuilder builder() { - return new BuilderSingularMapsBuilder(); + public static @java.lang.SuppressWarnings("all") BuilderSingularMaps.BuilderSingularMapsBuilder builder() { + return new BuilderSingularMaps.BuilderSingularMapsBuilder(); } } \ No newline at end of file diff --git a/test/transform/resource/after-ecj/BuilderSingularMapsWithSetterPrefix.java b/test/transform/resource/after-ecj/BuilderSingularMapsWithSetterPrefix.java index 7848b154..0832fdc0 100644 --- a/test/transform/resource/after-ecj/BuilderSingularMapsWithSetterPrefix.java +++ b/test/transform/resource/after-ecj/BuilderSingularMapsWithSetterPrefix.java @@ -14,7 +14,7 @@ import lombok.Singular; @java.lang.SuppressWarnings("all") BuilderSingularMapsWithSetterPrefixBuilder() { super(); } - public @java.lang.SuppressWarnings("all") BuilderSingularMapsWithSetterPrefixBuilder withWoman(final K womanKey, final V womanValue) { + public @java.lang.SuppressWarnings("all") BuilderSingularMapsWithSetterPrefix.BuilderSingularMapsWithSetterPrefixBuilder withWoman(final K womanKey, final V womanValue) { if ((this.women$key == null)) { this.women$key = new java.util.ArrayList(); @@ -24,7 +24,7 @@ import lombok.Singular; this.women$value.add(womanValue); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularMapsWithSetterPrefixBuilder withWomen(final java.util.Map women) { + public @java.lang.SuppressWarnings("all") BuilderSingularMapsWithSetterPrefix.BuilderSingularMapsWithSetterPrefixBuilder withWomen(final java.util.Map women) { if ((this.women$key == null)) { this.women$key = new java.util.ArrayList(); @@ -37,7 +37,7 @@ import lombok.Singular; } return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularMapsWithSetterPrefixBuilder clearWomen() { + public @java.lang.SuppressWarnings("all") BuilderSingularMapsWithSetterPrefix.BuilderSingularMapsWithSetterPrefixBuilder clearWomen() { if ((this.women$key != null)) { this.women$key.clear(); @@ -45,7 +45,7 @@ import lombok.Singular; } return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularMapsWithSetterPrefixBuilder withMan(final K manKey, final Number manValue) { + public @java.lang.SuppressWarnings("all") BuilderSingularMapsWithSetterPrefix.BuilderSingularMapsWithSetterPrefixBuilder withMan(final K manKey, final Number manValue) { if ((this.men$key == null)) { this.men$key = new java.util.ArrayList(); @@ -55,7 +55,7 @@ import lombok.Singular; this.men$value.add(manValue); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularMapsWithSetterPrefixBuilder withMen(final java.util.Map men) { + public @java.lang.SuppressWarnings("all") BuilderSingularMapsWithSetterPrefix.BuilderSingularMapsWithSetterPrefixBuilder withMen(final java.util.Map men) { if ((this.men$key == null)) { this.men$key = new java.util.ArrayList(); @@ -68,7 +68,7 @@ import lombok.Singular; } return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularMapsWithSetterPrefixBuilder clearMen() { + public @java.lang.SuppressWarnings("all") BuilderSingularMapsWithSetterPrefix.BuilderSingularMapsWithSetterPrefixBuilder clearMen() { if ((this.men$key != null)) { this.men$key.clear(); @@ -76,7 +76,7 @@ import lombok.Singular; } return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularMapsWithSetterPrefixBuilder withRawMap(final java.lang.Object rawMapKey, final java.lang.Object rawMapValue) { + public @java.lang.SuppressWarnings("all") BuilderSingularMapsWithSetterPrefix.BuilderSingularMapsWithSetterPrefixBuilder withRawMap(final java.lang.Object rawMapKey, final java.lang.Object rawMapValue) { if ((this.rawMap$key == null)) { this.rawMap$key = new java.util.ArrayList(); @@ -86,7 +86,7 @@ import lombok.Singular; this.rawMap$value.add(rawMapValue); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularMapsWithSetterPrefixBuilder withRawMap(final java.util.Map rawMap) { + public @java.lang.SuppressWarnings("all") BuilderSingularMapsWithSetterPrefix.BuilderSingularMapsWithSetterPrefixBuilder withRawMap(final java.util.Map rawMap) { if ((this.rawMap$key == null)) { this.rawMap$key = new java.util.ArrayList(); @@ -99,7 +99,7 @@ import lombok.Singular; } return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularMapsWithSetterPrefixBuilder clearRawMap() { + public @java.lang.SuppressWarnings("all") BuilderSingularMapsWithSetterPrefix.BuilderSingularMapsWithSetterPrefixBuilder clearRawMap() { if ((this.rawMap$key != null)) { this.rawMap$key.clear(); @@ -107,7 +107,7 @@ import lombok.Singular; } return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularMapsWithSetterPrefixBuilder withStringMap(final String stringMapKey, final V stringMapValue) { + public @java.lang.SuppressWarnings("all") BuilderSingularMapsWithSetterPrefix.BuilderSingularMapsWithSetterPrefixBuilder withStringMap(final String stringMapKey, final V stringMapValue) { if ((this.stringMap$key == null)) { this.stringMap$key = new java.util.ArrayList(); @@ -117,7 +117,7 @@ import lombok.Singular; this.stringMap$value.add(stringMapValue); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularMapsWithSetterPrefixBuilder withStringMap(final java.util.Map stringMap) { + public @java.lang.SuppressWarnings("all") BuilderSingularMapsWithSetterPrefix.BuilderSingularMapsWithSetterPrefixBuilder withStringMap(final java.util.Map stringMap) { if ((this.stringMap$key == null)) { this.stringMap$key = new java.util.ArrayList(); @@ -130,7 +130,7 @@ import lombok.Singular; } return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularMapsWithSetterPrefixBuilder clearStringMap() { + public @java.lang.SuppressWarnings("all") BuilderSingularMapsWithSetterPrefix.BuilderSingularMapsWithSetterPrefixBuilder clearStringMap() { if ((this.stringMap$key != null)) { this.stringMap$key.clear(); @@ -203,7 +203,7 @@ import lombok.Singular; this.rawMap = rawMap; this.stringMap = stringMap; } - public static @java.lang.SuppressWarnings("all") BuilderSingularMapsWithSetterPrefixBuilder builder() { - return new BuilderSingularMapsWithSetterPrefixBuilder(); + public static @java.lang.SuppressWarnings("all") BuilderSingularMapsWithSetterPrefix.BuilderSingularMapsWithSetterPrefixBuilder builder() { + return new BuilderSingularMapsWithSetterPrefix.BuilderSingularMapsWithSetterPrefixBuilder(); } } diff --git a/test/transform/resource/after-ecj/BuilderSingularNoAuto.java b/test/transform/resource/after-ecj/BuilderSingularNoAuto.java index 4d27f459..c1ac51eb 100644 --- a/test/transform/resource/after-ecj/BuilderSingularNoAuto.java +++ b/test/transform/resource/after-ecj/BuilderSingularNoAuto.java @@ -8,53 +8,53 @@ import lombok.Singular; @java.lang.SuppressWarnings("all") BuilderSingularNoAutoBuilder() { super(); } - public @java.lang.SuppressWarnings("all") BuilderSingularNoAutoBuilder things(final String things) { + public @java.lang.SuppressWarnings("all") BuilderSingularNoAuto.BuilderSingularNoAutoBuilder things(final String things) { if ((this.things == null)) this.things = new java.util.ArrayList(); this.things.add(things); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularNoAutoBuilder things(final java.util.Collection things) { + public @java.lang.SuppressWarnings("all") BuilderSingularNoAuto.BuilderSingularNoAutoBuilder things(final java.util.Collection things) { if ((this.things == null)) this.things = new java.util.ArrayList(); this.things.addAll(things); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularNoAutoBuilder clearThings() { + public @java.lang.SuppressWarnings("all") BuilderSingularNoAuto.BuilderSingularNoAutoBuilder clearThings() { if ((this.things != null)) this.things.clear(); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularNoAutoBuilder widget(final String widget) { + public @java.lang.SuppressWarnings("all") BuilderSingularNoAuto.BuilderSingularNoAutoBuilder widget(final String widget) { if ((this.widgets == null)) this.widgets = new java.util.ArrayList(); this.widgets.add(widget); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularNoAutoBuilder widgets(final java.util.Collection widgets) { + public @java.lang.SuppressWarnings("all") BuilderSingularNoAuto.BuilderSingularNoAutoBuilder widgets(final java.util.Collection widgets) { if ((this.widgets == null)) this.widgets = new java.util.ArrayList(); this.widgets.addAll(widgets); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularNoAutoBuilder clearWidgets() { + public @java.lang.SuppressWarnings("all") BuilderSingularNoAuto.BuilderSingularNoAutoBuilder clearWidgets() { if ((this.widgets != null)) this.widgets.clear(); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularNoAutoBuilder items(final String items) { + public @java.lang.SuppressWarnings("all") BuilderSingularNoAuto.BuilderSingularNoAutoBuilder items(final String items) { if ((this.items == null)) this.items = new java.util.ArrayList(); this.items.add(items); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularNoAutoBuilder items(final java.util.Collection items) { + public @java.lang.SuppressWarnings("all") BuilderSingularNoAuto.BuilderSingularNoAutoBuilder items(final java.util.Collection items) { if ((this.items == null)) this.items = new java.util.ArrayList(); this.items.addAll(items); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularNoAutoBuilder clearItems() { + public @java.lang.SuppressWarnings("all") BuilderSingularNoAuto.BuilderSingularNoAutoBuilder clearItems() { if ((this.items != null)) this.items.clear(); return this; @@ -108,7 +108,7 @@ import lombok.Singular; this.widgets = widgets; this.items = items; } - public static @java.lang.SuppressWarnings("all") BuilderSingularNoAutoBuilder builder() { - return new BuilderSingularNoAutoBuilder(); + public static @java.lang.SuppressWarnings("all") BuilderSingularNoAuto.BuilderSingularNoAutoBuilder builder() { + return new BuilderSingularNoAuto.BuilderSingularNoAutoBuilder(); } } diff --git a/test/transform/resource/after-ecj/BuilderSingularNoAutoWithSetterPrefix.java b/test/transform/resource/after-ecj/BuilderSingularNoAutoWithSetterPrefix.java index f24b1640..e869e871 100644 --- a/test/transform/resource/after-ecj/BuilderSingularNoAutoWithSetterPrefix.java +++ b/test/transform/resource/after-ecj/BuilderSingularNoAutoWithSetterPrefix.java @@ -8,53 +8,53 @@ import lombok.Singular; @java.lang.SuppressWarnings("all") BuilderSingularNoAutoWithSetterPrefixBuilder() { super(); } - public @java.lang.SuppressWarnings("all") BuilderSingularNoAutoWithSetterPrefixBuilder withThings(final String things) { + public @java.lang.SuppressWarnings("all") BuilderSingularNoAutoWithSetterPrefix.BuilderSingularNoAutoWithSetterPrefixBuilder withThings(final String things) { if ((this.things == null)) this.things = new java.util.ArrayList(); this.things.add(things); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularNoAutoWithSetterPrefixBuilder withThings(final java.util.Collection things) { + public @java.lang.SuppressWarnings("all") BuilderSingularNoAutoWithSetterPrefix.BuilderSingularNoAutoWithSetterPrefixBuilder withThings(final java.util.Collection things) { if ((this.things == null)) this.things = new java.util.ArrayList(); this.things.addAll(things); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularNoAutoWithSetterPrefixBuilder clearThings() { + public @java.lang.SuppressWarnings("all") BuilderSingularNoAutoWithSetterPrefix.BuilderSingularNoAutoWithSetterPrefixBuilder clearThings() { if ((this.things != null)) this.things.clear(); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularNoAutoWithSetterPrefixBuilder withWidget(final String widget) { + public @java.lang.SuppressWarnings("all") BuilderSingularNoAutoWithSetterPrefix.BuilderSingularNoAutoWithSetterPrefixBuilder withWidget(final String widget) { if ((this.widgets == null)) this.widgets = new java.util.ArrayList(); this.widgets.add(widget); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularNoAutoWithSetterPrefixBuilder withWidgets(final java.util.Collection widgets) { + public @java.lang.SuppressWarnings("all") BuilderSingularNoAutoWithSetterPrefix.BuilderSingularNoAutoWithSetterPrefixBuilder withWidgets(final java.util.Collection widgets) { if ((this.widgets == null)) this.widgets = new java.util.ArrayList(); this.widgets.addAll(widgets); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularNoAutoWithSetterPrefixBuilder clearWidgets() { + public @java.lang.SuppressWarnings("all") BuilderSingularNoAutoWithSetterPrefix.BuilderSingularNoAutoWithSetterPrefixBuilder clearWidgets() { if ((this.widgets != null)) this.widgets.clear(); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularNoAutoWithSetterPrefixBuilder withItems(final String items) { + public @java.lang.SuppressWarnings("all") BuilderSingularNoAutoWithSetterPrefix.BuilderSingularNoAutoWithSetterPrefixBuilder withItems(final String items) { if ((this.items == null)) this.items = new java.util.ArrayList(); this.items.add(items); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularNoAutoWithSetterPrefixBuilder withItems(final java.util.Collection items) { + public @java.lang.SuppressWarnings("all") BuilderSingularNoAutoWithSetterPrefix.BuilderSingularNoAutoWithSetterPrefixBuilder withItems(final java.util.Collection items) { if ((this.items == null)) this.items = new java.util.ArrayList(); this.items.addAll(items); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularNoAutoWithSetterPrefixBuilder clearItems() { + public @java.lang.SuppressWarnings("all") BuilderSingularNoAutoWithSetterPrefix.BuilderSingularNoAutoWithSetterPrefixBuilder clearItems() { if ((this.items != null)) this.items.clear(); return this; @@ -108,7 +108,7 @@ import lombok.Singular; this.widgets = widgets; this.items = items; } - public static @java.lang.SuppressWarnings("all") BuilderSingularNoAutoWithSetterPrefixBuilder builder() { - return new BuilderSingularNoAutoWithSetterPrefixBuilder(); + public static @java.lang.SuppressWarnings("all") BuilderSingularNoAutoWithSetterPrefix.BuilderSingularNoAutoWithSetterPrefixBuilder builder() { + return new BuilderSingularNoAutoWithSetterPrefix.BuilderSingularNoAutoWithSetterPrefixBuilder(); } } diff --git a/test/transform/resource/after-ecj/BuilderSingularRedirectToGuava.java b/test/transform/resource/after-ecj/BuilderSingularRedirectToGuava.java index c0f78b57..9e7028d6 100644 --- a/test/transform/resource/after-ecj/BuilderSingularRedirectToGuava.java +++ b/test/transform/resource/after-ecj/BuilderSingularRedirectToGuava.java @@ -10,51 +10,51 @@ import lombok.Singular; @java.lang.SuppressWarnings("all") BuilderSingularRedirectToGuavaBuilder() { super(); } - public @java.lang.SuppressWarnings("all") BuilderSingularRedirectToGuavaBuilder dangerMouse(final String dangerMouse) { + public @java.lang.SuppressWarnings("all") BuilderSingularRedirectToGuava.BuilderSingularRedirectToGuavaBuilder dangerMouse(final String dangerMouse) { if ((this.dangerMice == null)) this.dangerMice = com.google.common.collect.ImmutableSet.builder(); this.dangerMice.add(dangerMouse); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularRedirectToGuavaBuilder dangerMice(final java.lang.Iterable dangerMice) { + public @java.lang.SuppressWarnings("all") BuilderSingularRedirectToGuava.BuilderSingularRedirectToGuavaBuilder dangerMice(final java.lang.Iterable dangerMice) { if ((this.dangerMice == null)) this.dangerMice = com.google.common.collect.ImmutableSet.builder(); this.dangerMice.addAll(dangerMice); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularRedirectToGuavaBuilder clearDangerMice() { + public @java.lang.SuppressWarnings("all") BuilderSingularRedirectToGuava.BuilderSingularRedirectToGuavaBuilder clearDangerMice() { this.dangerMice = null; return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularRedirectToGuavaBuilder thing(final Integer key, final Number value) { + public @java.lang.SuppressWarnings("all") BuilderSingularRedirectToGuava.BuilderSingularRedirectToGuavaBuilder thing(final Integer key, final Number value) { if ((this.things == null)) this.things = com.google.common.collect.ImmutableSortedMap.naturalOrder(); this.things.put(key, value); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularRedirectToGuavaBuilder things(final java.util.Map things) { + public @java.lang.SuppressWarnings("all") BuilderSingularRedirectToGuava.BuilderSingularRedirectToGuavaBuilder things(final java.util.Map things) { if ((this.things == null)) this.things = com.google.common.collect.ImmutableSortedMap.naturalOrder(); this.things.putAll(things); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularRedirectToGuavaBuilder clearThings() { + public @java.lang.SuppressWarnings("all") BuilderSingularRedirectToGuava.BuilderSingularRedirectToGuavaBuilder clearThings() { this.things = null; return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularRedirectToGuavaBuilder doohickey(final Class doohickey) { + public @java.lang.SuppressWarnings("all") BuilderSingularRedirectToGuava.BuilderSingularRedirectToGuavaBuilder doohickey(final Class doohickey) { if ((this.doohickeys == null)) this.doohickeys = com.google.common.collect.ImmutableList.builder(); this.doohickeys.add(doohickey); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularRedirectToGuavaBuilder doohickeys(final java.lang.Iterable> doohickeys) { + public @java.lang.SuppressWarnings("all") BuilderSingularRedirectToGuava.BuilderSingularRedirectToGuavaBuilder doohickeys(final java.lang.Iterable> doohickeys) { if ((this.doohickeys == null)) this.doohickeys = com.google.common.collect.ImmutableList.builder(); this.doohickeys.addAll(doohickeys); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularRedirectToGuavaBuilder clearDoohickeys() { + public @java.lang.SuppressWarnings("all") BuilderSingularRedirectToGuava.BuilderSingularRedirectToGuavaBuilder clearDoohickeys() { this.doohickeys = null; return this; } @@ -77,7 +77,7 @@ import lombok.Singular; this.things = things; this.doohickeys = doohickeys; } - public static @java.lang.SuppressWarnings("all") BuilderSingularRedirectToGuavaBuilder builder() { - return new BuilderSingularRedirectToGuavaBuilder(); + public static @java.lang.SuppressWarnings("all") BuilderSingularRedirectToGuava.BuilderSingularRedirectToGuavaBuilder builder() { + return new BuilderSingularRedirectToGuava.BuilderSingularRedirectToGuavaBuilder(); } } \ No newline at end of file diff --git a/test/transform/resource/after-ecj/BuilderSingularRedirectToGuavaWithSetterPrefix.java b/test/transform/resource/after-ecj/BuilderSingularRedirectToGuavaWithSetterPrefix.java deleted file mode 100644 index c6e163cb..00000000 --- a/test/transform/resource/after-ecj/BuilderSingularRedirectToGuavaWithSetterPrefix.java +++ /dev/null @@ -1,83 +0,0 @@ -import java.util.Set; -import java.util.NavigableMap; -import java.util.Collection; -import lombok.Singular; -@lombok.Builder(setterPrefix = "with") class BuilderSingularRedirectToGuavaWithSetterPrefix { - public static @java.lang.SuppressWarnings("all") class BuilderSingularRedirectToGuavaWithSetterPrefixBuilder { - private @java.lang.SuppressWarnings("all") com.google.common.collect.ImmutableSet.Builder dangerMice; - private @java.lang.SuppressWarnings("all") com.google.common.collect.ImmutableSortedMap.Builder things; - private @java.lang.SuppressWarnings("all") com.google.common.collect.ImmutableList.Builder> doohickeys; - @java.lang.SuppressWarnings("all") BuilderSingularRedirectToGuavaWithSetterPrefixBuilder() { - super(); - } - public @java.lang.SuppressWarnings("all") BuilderSingularRedirectToGuavaWithSetterPrefixBuilder withDangerMouse(final String dangerMouse) { - if ((this.dangerMice == null)) - this.dangerMice = com.google.common.collect.ImmutableSet.builder(); - this.dangerMice.add(dangerMouse); - return this; - } - public @java.lang.SuppressWarnings("all") BuilderSingularRedirectToGuavaWithSetterPrefixBuilder withDangerMice(final java.lang.Iterable dangerMice) { - if ((this.dangerMice == null)) - this.dangerMice = com.google.common.collect.ImmutableSet.builder(); - this.dangerMice.addAll(dangerMice); - return this; - } - public @java.lang.SuppressWarnings("all") BuilderSingularRedirectToGuavaWithSetterPrefixBuilder clearDangerMice() { - this.dangerMice = null; - return this; - } - public @java.lang.SuppressWarnings("all") BuilderSingularRedirectToGuavaWithSetterPrefixBuilder withThing(final Integer key, final Number value) { - if ((this.things == null)) - this.things = com.google.common.collect.ImmutableSortedMap.naturalOrder(); - this.things.put(key, value); - return this; - } - public @java.lang.SuppressWarnings("all") BuilderSingularRedirectToGuavaWithSetterPrefixBuilder withThings(final java.util.Map things) { - if ((this.things == null)) - this.things = com.google.common.collect.ImmutableSortedMap.naturalOrder(); - this.things.putAll(things); - return this; - } - public @java.lang.SuppressWarnings("all") BuilderSingularRedirectToGuavaWithSetterPrefixBuilder clearThings() { - this.things = null; - return this; - } - public @java.lang.SuppressWarnings("all") BuilderSingularRedirectToGuavaWithSetterPrefixBuilder withDoohickey(final Class doohickey) { - if ((this.doohickeys == null)) - this.doohickeys = com.google.common.collect.ImmutableList.builder(); - this.doohickeys.add(doohickey); - return this; - } - public @java.lang.SuppressWarnings("all") BuilderSingularRedirectToGuavaWithSetterPrefixBuilder withDoohickeys(final java.lang.Iterable> doohickeys) { - if ((this.doohickeys == null)) - this.doohickeys = com.google.common.collect.ImmutableList.builder(); - this.doohickeys.addAll(doohickeys); - return this; - } - public @java.lang.SuppressWarnings("all") BuilderSingularRedirectToGuavaWithSetterPrefixBuilder clearDoohickeys() { - this.doohickeys = null; - return this; - } - public @java.lang.SuppressWarnings("all") BuilderSingularRedirectToGuavaWithSetterPrefix build() { - java.util.Set dangerMice = ((this.dangerMice == null) ? com.google.common.collect.ImmutableSet.of() : this.dangerMice.build()); - java.util.NavigableMap things = ((this.things == null) ? com.google.common.collect.ImmutableSortedMap.of() : this.things.build()); - java.util.Collection> doohickeys = ((this.doohickeys == null) ? com.google.common.collect.ImmutableList.>of() : this.doohickeys.build()); - return new BuilderSingularRedirectToGuavaWithSetterPrefix(dangerMice, things, doohickeys); - } - public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { - return (((((("BuilderSingularRedirectToGuavaWithSetterPrefix.BuilderSingularRedirectToGuavaWithSetterPrefixBuilder(dangerMice=" + this.dangerMice) + ", things=") + this.things) + ", doohickeys=") + this.doohickeys) + ")"); - } - } - private @Singular Set dangerMice; - private @Singular NavigableMap things; - private @Singular Collection> doohickeys; - @java.lang.SuppressWarnings("all") BuilderSingularRedirectToGuavaWithSetterPrefix(final Set dangerMice, final NavigableMap things, final Collection> doohickeys) { - super(); - this.dangerMice = dangerMice; - this.things = things; - this.doohickeys = doohickeys; - } - public static @java.lang.SuppressWarnings("all") BuilderSingularRedirectToGuavaWithSetterPrefixBuilder builder() { - return new BuilderSingularRedirectToGuavaWithSetterPrefixBuilder(); - } -} diff --git a/test/transform/resource/after-ecj/BuilderSingularSets.java b/test/transform/resource/after-ecj/BuilderSingularSets.java index eb53b1cd..b6ef04cb 100644 --- a/test/transform/resource/after-ecj/BuilderSingularSets.java +++ b/test/transform/resource/after-ecj/BuilderSingularSets.java @@ -10,70 +10,70 @@ import lombok.Singular; @java.lang.SuppressWarnings("all") BuilderSingularSetsBuilder() { super(); } - public @java.lang.SuppressWarnings("all") BuilderSingularSetsBuilder dangerMouse(final T dangerMouse) { + public @java.lang.SuppressWarnings("all") BuilderSingularSets.BuilderSingularSetsBuilder dangerMouse(final T dangerMouse) { if ((this.dangerMice == null)) this.dangerMice = new java.util.ArrayList(); this.dangerMice.add(dangerMouse); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularSetsBuilder dangerMice(final java.util.Collection dangerMice) { + public @java.lang.SuppressWarnings("all") BuilderSingularSets.BuilderSingularSetsBuilder dangerMice(final java.util.Collection dangerMice) { if ((this.dangerMice == null)) this.dangerMice = new java.util.ArrayList(); this.dangerMice.addAll(dangerMice); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularSetsBuilder clearDangerMice() { + public @java.lang.SuppressWarnings("all") BuilderSingularSets.BuilderSingularSetsBuilder clearDangerMice() { if ((this.dangerMice != null)) this.dangerMice.clear(); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularSetsBuilder octopus(final Number octopus) { + public @java.lang.SuppressWarnings("all") BuilderSingularSets.BuilderSingularSetsBuilder octopus(final Number octopus) { if ((this.octopodes == null)) this.octopodes = new java.util.ArrayList(); this.octopodes.add(octopus); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularSetsBuilder octopodes(final java.util.Collection octopodes) { + public @java.lang.SuppressWarnings("all") BuilderSingularSets.BuilderSingularSetsBuilder octopodes(final java.util.Collection octopodes) { if ((this.octopodes == null)) this.octopodes = new java.util.ArrayList(); this.octopodes.addAll(octopodes); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularSetsBuilder clearOctopodes() { + public @java.lang.SuppressWarnings("all") BuilderSingularSets.BuilderSingularSetsBuilder clearOctopodes() { if ((this.octopodes != null)) this.octopodes.clear(); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularSetsBuilder rawSet(final java.lang.Object rawSet) { + public @java.lang.SuppressWarnings("all") BuilderSingularSets.BuilderSingularSetsBuilder rawSet(final java.lang.Object rawSet) { if ((this.rawSet == null)) this.rawSet = new java.util.ArrayList(); this.rawSet.add(rawSet); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularSetsBuilder rawSet(final java.util.Collection rawSet) { + public @java.lang.SuppressWarnings("all") BuilderSingularSets.BuilderSingularSetsBuilder rawSet(final java.util.Collection rawSet) { if ((this.rawSet == null)) this.rawSet = new java.util.ArrayList(); this.rawSet.addAll(rawSet); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularSetsBuilder clearRawSet() { + public @java.lang.SuppressWarnings("all") BuilderSingularSets.BuilderSingularSetsBuilder clearRawSet() { if ((this.rawSet != null)) this.rawSet.clear(); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularSetsBuilder stringSet(final String stringSet) { + public @java.lang.SuppressWarnings("all") BuilderSingularSets.BuilderSingularSetsBuilder stringSet(final String stringSet) { if ((this.stringSet == null)) this.stringSet = new java.util.ArrayList(); this.stringSet.add(stringSet); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularSetsBuilder stringSet(final java.util.Collection stringSet) { + public @java.lang.SuppressWarnings("all") BuilderSingularSets.BuilderSingularSetsBuilder stringSet(final java.util.Collection stringSet) { if ((this.stringSet == null)) this.stringSet = new java.util.ArrayList(); this.stringSet.addAll(stringSet); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularSetsBuilder clearStringSet() { + public @java.lang.SuppressWarnings("all") BuilderSingularSets.BuilderSingularSetsBuilder clearStringSet() { if ((this.stringSet != null)) this.stringSet.clear(); return this; @@ -139,7 +139,7 @@ import lombok.Singular; this.rawSet = rawSet; this.stringSet = stringSet; } - public static @java.lang.SuppressWarnings("all") BuilderSingularSetsBuilder builder() { - return new BuilderSingularSetsBuilder(); + public static @java.lang.SuppressWarnings("all") BuilderSingularSets.BuilderSingularSetsBuilder builder() { + return new BuilderSingularSets.BuilderSingularSetsBuilder(); } } \ No newline at end of file diff --git a/test/transform/resource/after-ecj/BuilderSingularSetsWithSetterPrefix.java b/test/transform/resource/after-ecj/BuilderSingularSetsWithSetterPrefix.java index 905e9190..b857b586 100644 --- a/test/transform/resource/after-ecj/BuilderSingularSetsWithSetterPrefix.java +++ b/test/transform/resource/after-ecj/BuilderSingularSetsWithSetterPrefix.java @@ -10,70 +10,70 @@ import lombok.Singular; @java.lang.SuppressWarnings("all") BuilderSingularSetsWithSetterPrefixBuilder() { super(); } - public @java.lang.SuppressWarnings("all") BuilderSingularSetsWithSetterPrefixBuilder withDangerMouse(final T dangerMouse) { + public @java.lang.SuppressWarnings("all") BuilderSingularSetsWithSetterPrefix.BuilderSingularSetsWithSetterPrefixBuilder withDangerMouse(final T dangerMouse) { if ((this.dangerMice == null)) this.dangerMice = new java.util.ArrayList(); this.dangerMice.add(dangerMouse); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularSetsWithSetterPrefixBuilder withDangerMice(final java.util.Collection dangerMice) { + public @java.lang.SuppressWarnings("all") BuilderSingularSetsWithSetterPrefix.BuilderSingularSetsWithSetterPrefixBuilder withDangerMice(final java.util.Collection dangerMice) { if ((this.dangerMice == null)) this.dangerMice = new java.util.ArrayList(); this.dangerMice.addAll(dangerMice); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularSetsWithSetterPrefixBuilder clearDangerMice() { + public @java.lang.SuppressWarnings("all") BuilderSingularSetsWithSetterPrefix.BuilderSingularSetsWithSetterPrefixBuilder clearDangerMice() { if ((this.dangerMice != null)) this.dangerMice.clear(); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularSetsWithSetterPrefixBuilder withOctopus(final Number octopus) { + public @java.lang.SuppressWarnings("all") BuilderSingularSetsWithSetterPrefix.BuilderSingularSetsWithSetterPrefixBuilder withOctopus(final Number octopus) { if ((this.octopodes == null)) this.octopodes = new java.util.ArrayList(); this.octopodes.add(octopus); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularSetsWithSetterPrefixBuilder withOctopodes(final java.util.Collection octopodes) { + public @java.lang.SuppressWarnings("all") BuilderSingularSetsWithSetterPrefix.BuilderSingularSetsWithSetterPrefixBuilder withOctopodes(final java.util.Collection octopodes) { if ((this.octopodes == null)) this.octopodes = new java.util.ArrayList(); this.octopodes.addAll(octopodes); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularSetsWithSetterPrefixBuilder clearOctopodes() { + public @java.lang.SuppressWarnings("all") BuilderSingularSetsWithSetterPrefix.BuilderSingularSetsWithSetterPrefixBuilder clearOctopodes() { if ((this.octopodes != null)) this.octopodes.clear(); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularSetsWithSetterPrefixBuilder withRawSet(final java.lang.Object rawSet) { + public @java.lang.SuppressWarnings("all") BuilderSingularSetsWithSetterPrefix.BuilderSingularSetsWithSetterPrefixBuilder withRawSet(final java.lang.Object rawSet) { if ((this.rawSet == null)) this.rawSet = new java.util.ArrayList(); this.rawSet.add(rawSet); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularSetsWithSetterPrefixBuilder withRawSet(final java.util.Collection rawSet) { + public @java.lang.SuppressWarnings("all") BuilderSingularSetsWithSetterPrefix.BuilderSingularSetsWithSetterPrefixBuilder withRawSet(final java.util.Collection rawSet) { if ((this.rawSet == null)) this.rawSet = new java.util.ArrayList(); this.rawSet.addAll(rawSet); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularSetsWithSetterPrefixBuilder clearRawSet() { + public @java.lang.SuppressWarnings("all") BuilderSingularSetsWithSetterPrefix.BuilderSingularSetsWithSetterPrefixBuilder clearRawSet() { if ((this.rawSet != null)) this.rawSet.clear(); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularSetsWithSetterPrefixBuilder withStringSet(final String stringSet) { + public @java.lang.SuppressWarnings("all") BuilderSingularSetsWithSetterPrefix.BuilderSingularSetsWithSetterPrefixBuilder withStringSet(final String stringSet) { if ((this.stringSet == null)) this.stringSet = new java.util.ArrayList(); this.stringSet.add(stringSet); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularSetsWithSetterPrefixBuilder withStringSet(final java.util.Collection stringSet) { + public @java.lang.SuppressWarnings("all") BuilderSingularSetsWithSetterPrefix.BuilderSingularSetsWithSetterPrefixBuilder withStringSet(final java.util.Collection stringSet) { if ((this.stringSet == null)) this.stringSet = new java.util.ArrayList(); this.stringSet.addAll(stringSet); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularSetsWithSetterPrefixBuilder clearStringSet() { + public @java.lang.SuppressWarnings("all") BuilderSingularSetsWithSetterPrefix.BuilderSingularSetsWithSetterPrefixBuilder clearStringSet() { if ((this.stringSet != null)) this.stringSet.clear(); return this; @@ -139,7 +139,7 @@ import lombok.Singular; this.rawSet = rawSet; this.stringSet = stringSet; } - public static @java.lang.SuppressWarnings("all") BuilderSingularSetsWithSetterPrefixBuilder builder() { - return new BuilderSingularSetsWithSetterPrefixBuilder(); + public static @java.lang.SuppressWarnings("all") BuilderSingularSetsWithSetterPrefix.BuilderSingularSetsWithSetterPrefixBuilder builder() { + return new BuilderSingularSetsWithSetterPrefix.BuilderSingularSetsWithSetterPrefixBuilder(); } } diff --git a/test/transform/resource/after-ecj/BuilderSingularToBuilderWithNull.java b/test/transform/resource/after-ecj/BuilderSingularToBuilderWithNull.java index ccd6335a..99a277e3 100644 --- a/test/transform/resource/after-ecj/BuilderSingularToBuilderWithNull.java +++ b/test/transform/resource/after-ecj/BuilderSingularToBuilderWithNull.java @@ -5,19 +5,19 @@ import lombok.Singular; @java.lang.SuppressWarnings("all") BuilderSingularToBuilderWithNullBuilder() { super(); } - public @java.lang.SuppressWarnings("all") BuilderSingularToBuilderWithNullBuilder elem(final String elem) { + public @java.lang.SuppressWarnings("all") BuilderSingularToBuilderWithNull.BuilderSingularToBuilderWithNullBuilder elem(final String elem) { if ((this.elems == null)) this.elems = new java.util.ArrayList(); this.elems.add(elem); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularToBuilderWithNullBuilder elems(final java.util.Collection elems) { + public @java.lang.SuppressWarnings("all") BuilderSingularToBuilderWithNull.BuilderSingularToBuilderWithNullBuilder elems(final java.util.Collection elems) { if ((this.elems == null)) this.elems = new java.util.ArrayList(); this.elems.addAll(elems); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularToBuilderWithNullBuilder clearElems() { + public @java.lang.SuppressWarnings("all") BuilderSingularToBuilderWithNull.BuilderSingularToBuilderWithNullBuilder clearElems() { if ((this.elems != null)) this.elems.clear(); return this; @@ -48,11 +48,11 @@ import lombok.Singular; super(); this.elems = elems; } - public static @java.lang.SuppressWarnings("all") BuilderSingularToBuilderWithNullBuilder builder() { - return new BuilderSingularToBuilderWithNullBuilder(); + public static @java.lang.SuppressWarnings("all") BuilderSingularToBuilderWithNull.BuilderSingularToBuilderWithNullBuilder builder() { + return new BuilderSingularToBuilderWithNull.BuilderSingularToBuilderWithNullBuilder(); } - public @java.lang.SuppressWarnings("all") BuilderSingularToBuilderWithNullBuilder toBuilder() { - final BuilderSingularToBuilderWithNullBuilder builder = new BuilderSingularToBuilderWithNullBuilder(); + public @java.lang.SuppressWarnings("all") BuilderSingularToBuilderWithNull.BuilderSingularToBuilderWithNullBuilder toBuilder() { + final BuilderSingularToBuilderWithNull.BuilderSingularToBuilderWithNullBuilder builder = new BuilderSingularToBuilderWithNull.BuilderSingularToBuilderWithNullBuilder(); if ((this.elems != null)) builder.elems(this.elems); return builder; diff --git a/test/transform/resource/after-ecj/BuilderSingularToBuilderWithNullWithSetterPrefix.java b/test/transform/resource/after-ecj/BuilderSingularToBuilderWithNullWithSetterPrefix.java index ef2d02a1..a0223598 100644 --- a/test/transform/resource/after-ecj/BuilderSingularToBuilderWithNullWithSetterPrefix.java +++ b/test/transform/resource/after-ecj/BuilderSingularToBuilderWithNullWithSetterPrefix.java @@ -5,19 +5,19 @@ import lombok.Singular; @java.lang.SuppressWarnings("all") BuilderSingularToBuilderWithNullWithSetterPrefixBuilder() { super(); } - public @java.lang.SuppressWarnings("all") BuilderSingularToBuilderWithNullWithSetterPrefixBuilder withElem(final String elem) { + public @java.lang.SuppressWarnings("all") BuilderSingularToBuilderWithNullWithSetterPrefix.BuilderSingularToBuilderWithNullWithSetterPrefixBuilder withElem(final String elem) { if ((this.elems == null)) this.elems = new java.util.ArrayList(); this.elems.add(elem); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularToBuilderWithNullWithSetterPrefixBuilder withElems(final java.util.Collection elems) { + public @java.lang.SuppressWarnings("all") BuilderSingularToBuilderWithNullWithSetterPrefix.BuilderSingularToBuilderWithNullWithSetterPrefixBuilder withElems(final java.util.Collection elems) { if ((this.elems == null)) this.elems = new java.util.ArrayList(); this.elems.addAll(elems); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularToBuilderWithNullWithSetterPrefixBuilder clearElems() { + public @java.lang.SuppressWarnings("all") BuilderSingularToBuilderWithNullWithSetterPrefix.BuilderSingularToBuilderWithNullWithSetterPrefixBuilder clearElems() { if ((this.elems != null)) this.elems.clear(); return this; @@ -48,11 +48,11 @@ import lombok.Singular; super(); this.elems = elems; } - public static @java.lang.SuppressWarnings("all") BuilderSingularToBuilderWithNullWithSetterPrefixBuilder builder() { - return new BuilderSingularToBuilderWithNullWithSetterPrefixBuilder(); + public static @java.lang.SuppressWarnings("all") BuilderSingularToBuilderWithNullWithSetterPrefix.BuilderSingularToBuilderWithNullWithSetterPrefixBuilder builder() { + return new BuilderSingularToBuilderWithNullWithSetterPrefix.BuilderSingularToBuilderWithNullWithSetterPrefixBuilder(); } - public @java.lang.SuppressWarnings("all") BuilderSingularToBuilderWithNullWithSetterPrefixBuilder toBuilder() { - final BuilderSingularToBuilderWithNullWithSetterPrefixBuilder builder = new BuilderSingularToBuilderWithNullWithSetterPrefixBuilder(); + public @java.lang.SuppressWarnings("all") BuilderSingularToBuilderWithNullWithSetterPrefix.BuilderSingularToBuilderWithNullWithSetterPrefixBuilder toBuilder() { + final BuilderSingularToBuilderWithNullWithSetterPrefix.BuilderSingularToBuilderWithNullWithSetterPrefixBuilder builder = new BuilderSingularToBuilderWithNullWithSetterPrefix.BuilderSingularToBuilderWithNullWithSetterPrefixBuilder(); if ((this.elems != null)) builder.withElems(this.elems); return builder; diff --git a/test/transform/resource/after-ecj/BuilderSingularWildcardListsWithToBuilder.java b/test/transform/resource/after-ecj/BuilderSingularWildcardListsWithToBuilder.java index e336c3fc..e9c61eb6 100644 --- a/test/transform/resource/after-ecj/BuilderSingularWildcardListsWithToBuilder.java +++ b/test/transform/resource/after-ecj/BuilderSingularWildcardListsWithToBuilder.java @@ -8,36 +8,36 @@ import lombok.Singular; @java.lang.SuppressWarnings("all") BuilderSingularWildcardListsWithToBuilderBuilder() { super(); } - public @java.lang.SuppressWarnings("all") BuilderSingularWildcardListsWithToBuilderBuilder object(final java.lang.Object object) { + public @java.lang.SuppressWarnings("all") BuilderSingularWildcardListsWithToBuilder.BuilderSingularWildcardListsWithToBuilderBuilder object(final java.lang.Object object) { if ((this.objects == null)) this.objects = new java.util.ArrayList(); this.objects.add(object); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularWildcardListsWithToBuilderBuilder objects(final java.util.Collection objects) { + public @java.lang.SuppressWarnings("all") BuilderSingularWildcardListsWithToBuilder.BuilderSingularWildcardListsWithToBuilderBuilder objects(final java.util.Collection objects) { if ((this.objects == null)) this.objects = new java.util.ArrayList(); this.objects.addAll(objects); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularWildcardListsWithToBuilderBuilder clearObjects() { + public @java.lang.SuppressWarnings("all") BuilderSingularWildcardListsWithToBuilder.BuilderSingularWildcardListsWithToBuilderBuilder clearObjects() { if ((this.objects != null)) this.objects.clear(); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularWildcardListsWithToBuilderBuilder number(final Number number) { + public @java.lang.SuppressWarnings("all") BuilderSingularWildcardListsWithToBuilder.BuilderSingularWildcardListsWithToBuilderBuilder number(final Number number) { if ((this.numbers == null)) this.numbers = new java.util.ArrayList(); this.numbers.add(number); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularWildcardListsWithToBuilderBuilder numbers(final java.util.Collection numbers) { + public @java.lang.SuppressWarnings("all") BuilderSingularWildcardListsWithToBuilder.BuilderSingularWildcardListsWithToBuilderBuilder numbers(final java.util.Collection numbers) { if ((this.numbers == null)) this.numbers = new java.util.ArrayList(); this.numbers.addAll(numbers); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularWildcardListsWithToBuilderBuilder clearNumbers() { + public @java.lang.SuppressWarnings("all") BuilderSingularWildcardListsWithToBuilder.BuilderSingularWildcardListsWithToBuilderBuilder clearNumbers() { if ((this.numbers != null)) this.numbers.clear(); return this; @@ -78,11 +78,11 @@ import lombok.Singular; this.objects = objects; this.numbers = numbers; } - public static @java.lang.SuppressWarnings("all") BuilderSingularWildcardListsWithToBuilderBuilder builder() { - return new BuilderSingularWildcardListsWithToBuilderBuilder(); + public static @java.lang.SuppressWarnings("all") BuilderSingularWildcardListsWithToBuilder.BuilderSingularWildcardListsWithToBuilderBuilder builder() { + return new BuilderSingularWildcardListsWithToBuilder.BuilderSingularWildcardListsWithToBuilderBuilder(); } - public @java.lang.SuppressWarnings("all") BuilderSingularWildcardListsWithToBuilderBuilder toBuilder() { - final BuilderSingularWildcardListsWithToBuilderBuilder builder = new BuilderSingularWildcardListsWithToBuilderBuilder(); + public @java.lang.SuppressWarnings("all") BuilderSingularWildcardListsWithToBuilder.BuilderSingularWildcardListsWithToBuilderBuilder toBuilder() { + final BuilderSingularWildcardListsWithToBuilder.BuilderSingularWildcardListsWithToBuilderBuilder builder = new BuilderSingularWildcardListsWithToBuilder.BuilderSingularWildcardListsWithToBuilderBuilder(); if ((this.objects != null)) builder.objects(this.objects); if ((this.numbers != null)) diff --git a/test/transform/resource/after-ecj/BuilderSingularWildcardListsWithToBuilderWithSetterPrefix.java b/test/transform/resource/after-ecj/BuilderSingularWildcardListsWithToBuilderWithSetterPrefix.java deleted file mode 100644 index bbb10087..00000000 --- a/test/transform/resource/after-ecj/BuilderSingularWildcardListsWithToBuilderWithSetterPrefix.java +++ /dev/null @@ -1,92 +0,0 @@ -import java.util.List; -import java.util.Collection; -import lombok.Singular; -@lombok.Builder(toBuilder = true,setterPrefix = "with") class BuilderSingularWildcardListsWithToBuilderWithSetterPrefix { - public static @java.lang.SuppressWarnings("all") class BuilderSingularWildcardListsWithToBuilderWithSetterPrefixBuilder { - private @java.lang.SuppressWarnings("all") java.util.ArrayList objects; - private @java.lang.SuppressWarnings("all") java.util.ArrayList numbers; - @java.lang.SuppressWarnings("all") BuilderSingularWildcardListsWithToBuilderWithSetterPrefixBuilder() { - super(); - } - public @java.lang.SuppressWarnings("all") BuilderSingularWildcardListsWithToBuilderWithSetterPrefixBuilder withObject(final java.lang.Object object) { - if ((this.objects == null)) - this.objects = new java.util.ArrayList(); - this.objects.add(object); - return this; - } - public @java.lang.SuppressWarnings("all") BuilderSingularWildcardListsWithToBuilderWithSetterPrefixBuilder withObjects(final java.util.Collection objects) { - if ((this.objects == null)) - this.objects = new java.util.ArrayList(); - this.objects.addAll(objects); - return this; - } - public @java.lang.SuppressWarnings("all") BuilderSingularWildcardListsWithToBuilderWithSetterPrefixBuilder clearObjects() { - if ((this.objects != null)) - this.objects.clear(); - return this; - } - public @java.lang.SuppressWarnings("all") BuilderSingularWildcardListsWithToBuilderWithSetterPrefixBuilder withNumber(final Number number) { - if ((this.numbers == null)) - this.numbers = new java.util.ArrayList(); - this.numbers.add(number); - return this; - } - public @java.lang.SuppressWarnings("all") BuilderSingularWildcardListsWithToBuilderWithSetterPrefixBuilder withNumbers(final java.util.Collection numbers) { - if ((this.numbers == null)) - this.numbers = new java.util.ArrayList(); - this.numbers.addAll(numbers); - return this; - } - public @java.lang.SuppressWarnings("all") BuilderSingularWildcardListsWithToBuilderWithSetterPrefixBuilder clearNumbers() { - if ((this.numbers != null)) - this.numbers.clear(); - return this; - } - public @java.lang.SuppressWarnings("all") BuilderSingularWildcardListsWithToBuilderWithSetterPrefix build() { - java.util.List objects; - switch (((this.objects == null) ? 0 : this.objects.size())) { - case 0 : - objects = java.util.Collections.emptyList(); - break; - case 1 : - objects = java.util.Collections.singletonList(this.objects.get(0)); - break; - default : - objects = java.util.Collections.unmodifiableList(new java.util.ArrayList(this.objects)); - } - java.util.Collection numbers; - switch (((this.numbers == null) ? 0 : this.numbers.size())) { - case 0 : - numbers = java.util.Collections.emptyList(); - break; - case 1 : - numbers = java.util.Collections.singletonList(this.numbers.get(0)); - break; - default : - numbers = java.util.Collections.unmodifiableList(new java.util.ArrayList(this.numbers)); - } - return new BuilderSingularWildcardListsWithToBuilderWithSetterPrefix(objects, numbers); - } - public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { - return (((("BuilderSingularWildcardListsWithToBuilderWithSetterPrefix.BuilderSingularWildcardListsWithToBuilderWithSetterPrefixBuilder(objects=" + this.objects) + ", numbers=") + this.numbers) + ")"); - } - } - private @Singular List objects; - private @Singular Collection numbers; - @java.lang.SuppressWarnings("all") BuilderSingularWildcardListsWithToBuilderWithSetterPrefix(final List objects, final Collection numbers) { - super(); - this.objects = objects; - this.numbers = numbers; - } - public static @java.lang.SuppressWarnings("all") BuilderSingularWildcardListsWithToBuilderWithSetterPrefixBuilder builder() { - return new BuilderSingularWildcardListsWithToBuilderWithSetterPrefixBuilder(); - } - public @java.lang.SuppressWarnings("all") BuilderSingularWildcardListsWithToBuilderWithSetterPrefixBuilder toBuilder() { - final BuilderSingularWildcardListsWithToBuilderWithSetterPrefixBuilder builder = new BuilderSingularWildcardListsWithToBuilderWithSetterPrefixBuilder(); - if ((this.objects != null)) - builder.withObjects(this.objects); - if ((this.numbers != null)) - builder.withNumbers(this.numbers); - return builder; - } -} diff --git a/test/transform/resource/after-ecj/BuilderSingularWithPrefixes.java b/test/transform/resource/after-ecj/BuilderSingularWithPrefixes.java index 31579497..5f8a8ee0 100644 --- a/test/transform/resource/after-ecj/BuilderSingularWithPrefixes.java +++ b/test/transform/resource/after-ecj/BuilderSingularWithPrefixes.java @@ -5,19 +5,19 @@ import lombok.Singular; @java.lang.SuppressWarnings("all") BuilderSingularWithPrefixesBuilder() { super(); } - public @java.lang.SuppressWarnings("all") BuilderSingularWithPrefixesBuilder elem(final String elem) { + public @java.lang.SuppressWarnings("all") BuilderSingularWithPrefixes.BuilderSingularWithPrefixesBuilder elem(final String elem) { if ((this.elems == null)) this.elems = new java.util.ArrayList(); this.elems.add(elem); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularWithPrefixesBuilder elems(final java.util.Collection elems) { + public @java.lang.SuppressWarnings("all") BuilderSingularWithPrefixes.BuilderSingularWithPrefixesBuilder elems(final java.util.Collection elems) { if ((this.elems == null)) this.elems = new java.util.ArrayList(); this.elems.addAll(elems); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularWithPrefixesBuilder clearElems() { + public @java.lang.SuppressWarnings("all") BuilderSingularWithPrefixes.BuilderSingularWithPrefixesBuilder clearElems() { if ((this.elems != null)) this.elems.clear(); return this; @@ -45,7 +45,7 @@ import lombok.Singular; super(); this._elems = elems; } - public static @java.lang.SuppressWarnings("all") BuilderSingularWithPrefixesBuilder builder() { - return new BuilderSingularWithPrefixesBuilder(); + public static @java.lang.SuppressWarnings("all") BuilderSingularWithPrefixes.BuilderSingularWithPrefixesBuilder builder() { + return new BuilderSingularWithPrefixes.BuilderSingularWithPrefixesBuilder(); } } \ No newline at end of file diff --git a/test/transform/resource/after-ecj/BuilderSingularWithPrefixesWithSetterPrefix.java b/test/transform/resource/after-ecj/BuilderSingularWithPrefixesWithSetterPrefix.java index f3218f27..377a9c27 100644 --- a/test/transform/resource/after-ecj/BuilderSingularWithPrefixesWithSetterPrefix.java +++ b/test/transform/resource/after-ecj/BuilderSingularWithPrefixesWithSetterPrefix.java @@ -5,19 +5,19 @@ import lombok.Singular; @java.lang.SuppressWarnings("all") BuilderSingularWithPrefixesWithSetterPrefixBuilder() { super(); } - public @java.lang.SuppressWarnings("all") BuilderSingularWithPrefixesWithSetterPrefixBuilder withElem(final String elem) { + public @java.lang.SuppressWarnings("all") BuilderSingularWithPrefixesWithSetterPrefix.BuilderSingularWithPrefixesWithSetterPrefixBuilder withElem(final String elem) { if ((this.elems == null)) this.elems = new java.util.ArrayList(); this.elems.add(elem); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularWithPrefixesWithSetterPrefixBuilder withElems(final java.util.Collection elems) { + public @java.lang.SuppressWarnings("all") BuilderSingularWithPrefixesWithSetterPrefix.BuilderSingularWithPrefixesWithSetterPrefixBuilder withElems(final java.util.Collection elems) { if ((this.elems == null)) this.elems = new java.util.ArrayList(); this.elems.addAll(elems); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularWithPrefixesWithSetterPrefixBuilder clearElems() { + public @java.lang.SuppressWarnings("all") BuilderSingularWithPrefixesWithSetterPrefix.BuilderSingularWithPrefixesWithSetterPrefixBuilder clearElems() { if ((this.elems != null)) this.elems.clear(); return this; @@ -45,7 +45,7 @@ import lombok.Singular; super(); this._elems = elems; } - public static @java.lang.SuppressWarnings("all") BuilderSingularWithPrefixesWithSetterPrefixBuilder builder() { - return new BuilderSingularWithPrefixesWithSetterPrefixBuilder(); + public static @java.lang.SuppressWarnings("all") BuilderSingularWithPrefixesWithSetterPrefix.BuilderSingularWithPrefixesWithSetterPrefixBuilder builder() { + return new BuilderSingularWithPrefixesWithSetterPrefix.BuilderSingularWithPrefixesWithSetterPrefixBuilder(); } } diff --git a/test/transform/resource/after-ecj/BuilderTypeAnnos.java b/test/transform/resource/after-ecj/BuilderTypeAnnos.java index 1c310f38..18116b90 100644 --- a/test/transform/resource/after-ecj/BuilderTypeAnnos.java +++ b/test/transform/resource/after-ecj/BuilderTypeAnnos.java @@ -11,7 +11,7 @@ import java.util.List; @java.lang.SuppressWarnings("all") BuilderTypeAnnosBuilder() { super(); } - public @java.lang.SuppressWarnings("all") BuilderTypeAnnosBuilder foo(final @TA List foo) { + public @java.lang.SuppressWarnings("all") BuilderTypeAnnos.BuilderTypeAnnosBuilder foo(final @TA List foo) { this.foo = foo; return this; } @@ -27,7 +27,7 @@ import java.util.List; super(); this.foo = foo; } - public static @java.lang.SuppressWarnings("all") BuilderTypeAnnosBuilder builder() { - return new BuilderTypeAnnosBuilder(); + public static @java.lang.SuppressWarnings("all") BuilderTypeAnnos.BuilderTypeAnnosBuilder builder() { + return new BuilderTypeAnnos.BuilderTypeAnnosBuilder(); } } diff --git a/test/transform/resource/after-ecj/BuilderTypeAnnosWithSetterPrefix.java b/test/transform/resource/after-ecj/BuilderTypeAnnosWithSetterPrefix.java index db44aa12..6b3de70e 100644 --- a/test/transform/resource/after-ecj/BuilderTypeAnnosWithSetterPrefix.java +++ b/test/transform/resource/after-ecj/BuilderTypeAnnosWithSetterPrefix.java @@ -11,7 +11,7 @@ import java.util.List; @java.lang.SuppressWarnings("all") BuilderTypeAnnosWithSetterPrefixBuilder() { super(); } - public @java.lang.SuppressWarnings("all") BuilderTypeAnnosWithSetterPrefixBuilder withFoo(final @TA List foo) { + public @java.lang.SuppressWarnings("all") BuilderTypeAnnosWithSetterPrefix.BuilderTypeAnnosWithSetterPrefixBuilder withFoo(final @TA List foo) { this.foo = foo; return this; } @@ -27,7 +27,7 @@ import java.util.List; super(); this.foo = foo; } - public static @java.lang.SuppressWarnings("all") BuilderTypeAnnosWithSetterPrefixBuilder builder() { - return new BuilderTypeAnnosWithSetterPrefixBuilder(); + public static @java.lang.SuppressWarnings("all") BuilderTypeAnnosWithSetterPrefix.BuilderTypeAnnosWithSetterPrefixBuilder builder() { + return new BuilderTypeAnnosWithSetterPrefix.BuilderTypeAnnosWithSetterPrefixBuilder(); } } diff --git a/test/transform/resource/after-ecj/BuilderValueData.java b/test/transform/resource/after-ecj/BuilderValueData.java index 06456e86..deffcbb9 100644 --- a/test/transform/resource/after-ecj/BuilderValueData.java +++ b/test/transform/resource/after-ecj/BuilderValueData.java @@ -15,8 +15,8 @@ final @lombok.Builder @lombok.Value class BuilderAndValue { @java.lang.SuppressWarnings("all") BuilderAndValue() { super(); } - public static @java.lang.SuppressWarnings("all") BuilderAndValueBuilder builder() { - return new BuilderAndValueBuilder(); + public static @java.lang.SuppressWarnings("all") BuilderAndValue.BuilderAndValueBuilder builder() { + return new BuilderAndValue.BuilderAndValueBuilder(); } public @java.lang.SuppressWarnings("all") int getZero() { return this.zero; @@ -57,8 +57,8 @@ final @lombok.Builder @lombok.Value class BuilderAndValue { @java.lang.SuppressWarnings("all") BuilderAndData() { super(); } - public static @java.lang.SuppressWarnings("all") BuilderAndDataBuilder builder() { - return new BuilderAndDataBuilder(); + public static @java.lang.SuppressWarnings("all") BuilderAndData.BuilderAndDataBuilder builder() { + return new BuilderAndData.BuilderAndDataBuilder(); } public @java.lang.SuppressWarnings("all") int getZero() { return this.zero; diff --git a/test/transform/resource/after-ecj/BuilderValueDataWithSetterPrefix.java b/test/transform/resource/after-ecj/BuilderValueDataWithSetterPrefix.java index 065c93fe..832bac24 100644 --- a/test/transform/resource/after-ecj/BuilderValueDataWithSetterPrefix.java +++ b/test/transform/resource/after-ecj/BuilderValueDataWithSetterPrefix.java @@ -15,8 +15,8 @@ final @lombok.Builder(setterPrefix = "with") @lombok.Value class BuilderAndValue @java.lang.SuppressWarnings("all") BuilderAndValueWithSetterPrefix() { super(); } - public static @java.lang.SuppressWarnings("all") BuilderAndValueWithSetterPrefixBuilder builder() { - return new BuilderAndValueWithSetterPrefixBuilder(); + public static @java.lang.SuppressWarnings("all") BuilderAndValueWithSetterPrefix.BuilderAndValueWithSetterPrefixBuilder builder() { + return new BuilderAndValueWithSetterPrefix.BuilderAndValueWithSetterPrefixBuilder(); } public @java.lang.SuppressWarnings("all") int getZero() { return this.zero; @@ -57,8 +57,8 @@ final @lombok.Builder(setterPrefix = "with") @lombok.Value class BuilderAndValue @java.lang.SuppressWarnings("all") BuilderAndDataWithSetterPrefix() { super(); } - public static @java.lang.SuppressWarnings("all") BuilderAndDataWithSetterPrefixBuilder builder() { - return new BuilderAndDataWithSetterPrefixBuilder(); + public static @java.lang.SuppressWarnings("all") BuilderAndDataWithSetterPrefix.BuilderAndDataWithSetterPrefixBuilder builder() { + return new BuilderAndDataWithSetterPrefix.BuilderAndDataWithSetterPrefixBuilder(); } public @java.lang.SuppressWarnings("all") int getZero() { return this.zero; diff --git a/test/transform/resource/after-ecj/BuilderWithAccessors.java b/test/transform/resource/after-ecj/BuilderWithAccessors.java index a7bee291..a5e00964 100644 --- a/test/transform/resource/after-ecj/BuilderWithAccessors.java +++ b/test/transform/resource/after-ecj/BuilderWithAccessors.java @@ -7,19 +7,19 @@ @java.lang.SuppressWarnings("all") BuilderWithAccessorsBuilder() { super(); } - public @java.lang.SuppressWarnings("all") BuilderWithAccessorsBuilder plower(final int plower) { + public @java.lang.SuppressWarnings("all") BuilderWithAccessors.BuilderWithAccessorsBuilder plower(final int plower) { this.plower = plower; return this; } - public @java.lang.SuppressWarnings("all") BuilderWithAccessorsBuilder upper(final int upper) { + public @java.lang.SuppressWarnings("all") BuilderWithAccessors.BuilderWithAccessorsBuilder upper(final int upper) { this.upper = upper; return this; } - public @java.lang.SuppressWarnings("all") BuilderWithAccessorsBuilder foo(final int foo) { + public @java.lang.SuppressWarnings("all") BuilderWithAccessors.BuilderWithAccessorsBuilder foo(final int foo) { this.foo = foo; return this; } - public @java.lang.SuppressWarnings("all") BuilderWithAccessorsBuilder _bar(final int _bar) { + public @java.lang.SuppressWarnings("all") BuilderWithAccessors.BuilderWithAccessorsBuilder _bar(final int _bar) { this._bar = _bar; return this; } @@ -41,7 +41,7 @@ this._foo = foo; this.__bar = _bar; } - public static @java.lang.SuppressWarnings("all") BuilderWithAccessorsBuilder builder() { - return new BuilderWithAccessorsBuilder(); + public static @java.lang.SuppressWarnings("all") BuilderWithAccessors.BuilderWithAccessorsBuilder builder() { + return new BuilderWithAccessors.BuilderWithAccessorsBuilder(); } } diff --git a/test/transform/resource/after-ecj/BuilderWithAccessorsWithSetterPrefix.java b/test/transform/resource/after-ecj/BuilderWithAccessorsWithSetterPrefix.java deleted file mode 100644 index d9c10e5b..00000000 --- a/test/transform/resource/after-ecj/BuilderWithAccessorsWithSetterPrefix.java +++ /dev/null @@ -1,47 +0,0 @@ -@lombok.Builder(setterPrefix = "with") @lombok.experimental.Accessors(prefix = {"p", "_"}) class BuilderWithAccessorsWithSetterPrefix { - public static @java.lang.SuppressWarnings("all") class BuilderWithAccessorsWithSetterPrefixBuilder { - private @java.lang.SuppressWarnings("all") int plower; - private @java.lang.SuppressWarnings("all") int upper; - private @java.lang.SuppressWarnings("all") int foo; - private @java.lang.SuppressWarnings("all") int _bar; - @java.lang.SuppressWarnings("all") BuilderWithAccessorsWithSetterPrefixBuilder() { - super(); - } - public @java.lang.SuppressWarnings("all") BuilderWithAccessorsWithSetterPrefixBuilder withPlower(final int plower) { - this.plower = plower; - return this; - } - public @java.lang.SuppressWarnings("all") BuilderWithAccessorsWithSetterPrefixBuilder withUpper(final int upper) { - this.upper = upper; - return this; - } - public @java.lang.SuppressWarnings("all") BuilderWithAccessorsWithSetterPrefixBuilder withFoo(final int foo) { - this.foo = foo; - return this; - } - public @java.lang.SuppressWarnings("all") BuilderWithAccessorsWithSetterPrefixBuilder with_bar(final int _bar) { - this._bar = _bar; - return this; - } - public @java.lang.SuppressWarnings("all") BuilderWithAccessorsWithSetterPrefix build() { - return new BuilderWithAccessorsWithSetterPrefix(plower, upper, foo, _bar); - } - public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { - return (((((((("BuilderWithAccessorsWithSetterPrefix.BuilderWithAccessorsWithSetterPrefixBuilder(plower=" + this.plower) + ", upper=") + this.upper) + ", foo=") + this.foo) + ", _bar=") + this._bar) + ")"); - } - } - private final int plower; - private final int pUpper; - private int _foo; - private int __bar; - @java.lang.SuppressWarnings("all") BuilderWithAccessorsWithSetterPrefix(final int plower, final int upper, final int foo, final int _bar) { - super(); - this.plower = plower; - this.pUpper = upper; - this._foo = foo; - this.__bar = _bar; - } - public static @java.lang.SuppressWarnings("all") BuilderWithAccessorsWithSetterPrefixBuilder builder() { - return new BuilderWithAccessorsWithSetterPrefixBuilder(); - } -} diff --git a/test/transform/resource/after-ecj/BuilderWithBadNames.java b/test/transform/resource/after-ecj/BuilderWithBadNames.java index a31b2f16..301f035f 100644 --- a/test/transform/resource/after-ecj/BuilderWithBadNames.java +++ b/test/transform/resource/after-ecj/BuilderWithBadNames.java @@ -5,11 +5,11 @@ public @lombok.Builder class BuilderWithBadNames { @java.lang.SuppressWarnings("all") BuilderWithBadNamesBuilder() { super(); } - public @java.lang.SuppressWarnings("all") BuilderWithBadNamesBuilder build(final String build) { + public @java.lang.SuppressWarnings("all") BuilderWithBadNames.BuilderWithBadNamesBuilder build(final String build) { this.build = build; return this; } - public @java.lang.SuppressWarnings("all") BuilderWithBadNamesBuilder toString(final String toString) { + public @java.lang.SuppressWarnings("all") BuilderWithBadNames.BuilderWithBadNamesBuilder toString(final String toString) { this.toString = toString; return this; } @@ -27,7 +27,7 @@ public @lombok.Builder class BuilderWithBadNames { this.build = build; this.toString = toString; } - public static @java.lang.SuppressWarnings("all") BuilderWithBadNamesBuilder builder() { - return new BuilderWithBadNamesBuilder(); + public static @java.lang.SuppressWarnings("all") BuilderWithBadNames.BuilderWithBadNamesBuilder builder() { + return new BuilderWithBadNames.BuilderWithBadNamesBuilder(); } } diff --git a/test/transform/resource/after-ecj/BuilderWithBadNamesWithSetterPrefix.java b/test/transform/resource/after-ecj/BuilderWithBadNamesWithSetterPrefix.java deleted file mode 100644 index 248c77ad..00000000 --- a/test/transform/resource/after-ecj/BuilderWithBadNamesWithSetterPrefix.java +++ /dev/null @@ -1,33 +0,0 @@ -public @lombok.Builder(setterPrefix = "with") class BuilderWithBadNamesWithSetterPrefix { - public static @java.lang.SuppressWarnings("all") class BuilderWithBadNamesWithSetterPrefixBuilder { - private @java.lang.SuppressWarnings("all") String build; - private @java.lang.SuppressWarnings("all") String toString; - @java.lang.SuppressWarnings("all") BuilderWithBadNamesWithSetterPrefixBuilder() { - super(); - } - public @java.lang.SuppressWarnings("all") BuilderWithBadNamesWithSetterPrefixBuilder withBuild(final String build) { - this.build = build; - return this; - } - public @java.lang.SuppressWarnings("all") BuilderWithBadNamesWithSetterPrefixBuilder withToString(final String toString) { - this.toString = toString; - return this; - } - public @java.lang.SuppressWarnings("all") BuilderWithBadNamesWithSetterPrefix build() { - return new BuilderWithBadNamesWithSetterPrefix(build, toString); - } - public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { - return (((("BuilderWithBadNamesWithSetterPrefix.BuilderWithBadNamesWithSetterPrefixBuilder(build=" + this.build) + ", toString=") + this.toString) + ")"); - } - } - String build; - String toString; - @java.lang.SuppressWarnings("all") BuilderWithBadNamesWithSetterPrefix(final String build, final String toString) { - super(); - this.build = build; - this.toString = toString; - } - public static @java.lang.SuppressWarnings("all") BuilderWithBadNamesWithSetterPrefixBuilder builder() { - return new BuilderWithBadNamesWithSetterPrefixBuilder(); - } -} diff --git a/test/transform/resource/after-ecj/BuilderWithDeprecated.java b/test/transform/resource/after-ecj/BuilderWithDeprecated.java index b429c3e7..0bcdee42 100644 --- a/test/transform/resource/after-ecj/BuilderWithDeprecated.java +++ b/test/transform/resource/after-ecj/BuilderWithDeprecated.java @@ -10,44 +10,44 @@ public @Builder class BuilderWithDeprecated { @java.lang.SuppressWarnings("all") BuilderWithDeprecatedBuilder() { super(); } - public @java.lang.Deprecated @java.lang.SuppressWarnings("all") BuilderWithDeprecatedBuilder dep1(final String dep1) { + public @java.lang.Deprecated @java.lang.SuppressWarnings("all") BuilderWithDeprecated.BuilderWithDeprecatedBuilder dep1(final String dep1) { this.dep1 = dep1; return this; } - public @java.lang.Deprecated @java.lang.SuppressWarnings("all") BuilderWithDeprecatedBuilder dep2(final int dep2) { + public @java.lang.Deprecated @java.lang.SuppressWarnings("all") BuilderWithDeprecated.BuilderWithDeprecatedBuilder dep2(final int dep2) { this.dep2 = dep2; return this; } - public @java.lang.Deprecated @java.lang.SuppressWarnings("all") BuilderWithDeprecatedBuilder string(final String string) { + public @java.lang.Deprecated @java.lang.SuppressWarnings("all") BuilderWithDeprecated.BuilderWithDeprecatedBuilder string(final String string) { if ((this.strings == null)) this.strings = new java.util.ArrayList(); this.strings.add(string); return this; } - public @java.lang.Deprecated @java.lang.SuppressWarnings("all") BuilderWithDeprecatedBuilder strings(final java.util.Collection strings) { + public @java.lang.Deprecated @java.lang.SuppressWarnings("all") BuilderWithDeprecated.BuilderWithDeprecatedBuilder strings(final java.util.Collection strings) { if ((this.strings == null)) this.strings = new java.util.ArrayList(); this.strings.addAll(strings); return this; } - public @java.lang.Deprecated @java.lang.SuppressWarnings("all") BuilderWithDeprecatedBuilder clearStrings() { + public @java.lang.Deprecated @java.lang.SuppressWarnings("all") BuilderWithDeprecated.BuilderWithDeprecatedBuilder clearStrings() { if ((this.strings != null)) this.strings.clear(); return this; } - public @java.lang.Deprecated @java.lang.SuppressWarnings("all") BuilderWithDeprecatedBuilder number(final Integer number) { + public @java.lang.Deprecated @java.lang.SuppressWarnings("all") BuilderWithDeprecated.BuilderWithDeprecatedBuilder number(final Integer number) { if ((this.numbers == null)) this.numbers = com.google.common.collect.ImmutableList.builder(); this.numbers.add(number); return this; } - public @java.lang.Deprecated @java.lang.SuppressWarnings("all") BuilderWithDeprecatedBuilder numbers(final java.lang.Iterable numbers) { + public @java.lang.Deprecated @java.lang.SuppressWarnings("all") BuilderWithDeprecated.BuilderWithDeprecatedBuilder numbers(final java.lang.Iterable numbers) { if ((this.numbers == null)) this.numbers = com.google.common.collect.ImmutableList.builder(); this.numbers.addAll(numbers); return this; } - public @java.lang.Deprecated @java.lang.SuppressWarnings("all") BuilderWithDeprecatedBuilder clearNumbers() { + public @java.lang.Deprecated @java.lang.SuppressWarnings("all") BuilderWithDeprecated.BuilderWithDeprecatedBuilder clearNumbers() { this.numbers = null; return this; } @@ -81,7 +81,7 @@ public @Builder class BuilderWithDeprecated { this.strings = strings; this.numbers = numbers; } - public static @java.lang.SuppressWarnings("all") BuilderWithDeprecatedBuilder builder() { - return new BuilderWithDeprecatedBuilder(); + public static @java.lang.SuppressWarnings("all") BuilderWithDeprecated.BuilderWithDeprecatedBuilder builder() { + return new BuilderWithDeprecated.BuilderWithDeprecatedBuilder(); } } \ No newline at end of file diff --git a/test/transform/resource/after-ecj/BuilderWithDeprecatedWithSetterPrefix.java b/test/transform/resource/after-ecj/BuilderWithDeprecatedWithSetterPrefix.java deleted file mode 100644 index 83fa2e4e..00000000 --- a/test/transform/resource/after-ecj/BuilderWithDeprecatedWithSetterPrefix.java +++ /dev/null @@ -1,87 +0,0 @@ -import com.google.common.collect.ImmutableList; -import lombok.Builder; -import lombok.Singular; -public @Builder(setterPrefix = "with") class BuilderWithDeprecatedWithSetterPrefix { - public static @java.lang.SuppressWarnings("all") class BuilderWithDeprecatedWithSetterPrefixBuilder { - private @java.lang.SuppressWarnings("all") String dep1; - private @java.lang.SuppressWarnings("all") int dep2; - private @java.lang.SuppressWarnings("all") java.util.ArrayList strings; - private @java.lang.SuppressWarnings("all") com.google.common.collect.ImmutableList.Builder numbers; - @java.lang.SuppressWarnings("all") BuilderWithDeprecatedWithSetterPrefixBuilder() { - super(); - } - public @java.lang.Deprecated @java.lang.SuppressWarnings("all") BuilderWithDeprecatedWithSetterPrefixBuilder withDep1(final String dep1) { - this.dep1 = dep1; - return this; - } - public @java.lang.Deprecated @java.lang.SuppressWarnings("all") BuilderWithDeprecatedWithSetterPrefixBuilder withDep2(final int dep2) { - this.dep2 = dep2; - return this; - } - public @java.lang.Deprecated @java.lang.SuppressWarnings("all") BuilderWithDeprecatedWithSetterPrefixBuilder withString(final String string) { - if ((this.strings == null)) - this.strings = new java.util.ArrayList(); - this.strings.add(string); - return this; - } - public @java.lang.Deprecated @java.lang.SuppressWarnings("all") BuilderWithDeprecatedWithSetterPrefixBuilder withStrings(final java.util.Collection strings) { - if ((this.strings == null)) - this.strings = new java.util.ArrayList(); - this.strings.addAll(strings); - return this; - } - public @java.lang.Deprecated @java.lang.SuppressWarnings("all") BuilderWithDeprecatedWithSetterPrefixBuilder clearStrings() { - if ((this.strings != null)) - this.strings.clear(); - return this; - } - public @java.lang.Deprecated @java.lang.SuppressWarnings("all") BuilderWithDeprecatedWithSetterPrefixBuilder withNumber(final Integer number) { - if ((this.numbers == null)) - this.numbers = com.google.common.collect.ImmutableList.builder(); - this.numbers.add(number); - return this; - } - public @java.lang.Deprecated @java.lang.SuppressWarnings("all") BuilderWithDeprecatedWithSetterPrefixBuilder withNumbers(final java.lang.Iterable numbers) { - if ((this.numbers == null)) - this.numbers = com.google.common.collect.ImmutableList.builder(); - this.numbers.addAll(numbers); - return this; - } - public @java.lang.Deprecated @java.lang.SuppressWarnings("all") BuilderWithDeprecatedWithSetterPrefixBuilder clearNumbers() { - this.numbers = null; - return this; - } - public @java.lang.SuppressWarnings("all") BuilderWithDeprecatedWithSetterPrefix build() { - java.util.List strings; - switch (((this.strings == null) ? 0 : this.strings.size())) { - case 0 : - strings = java.util.Collections.emptyList(); - break; - case 1 : - strings = java.util.Collections.singletonList(this.strings.get(0)); - break; - default : - strings = java.util.Collections.unmodifiableList(new java.util.ArrayList(this.strings)); - } - com.google.common.collect.ImmutableList numbers = ((this.numbers == null) ? com.google.common.collect.ImmutableList.of() : this.numbers.build()); - return new BuilderWithDeprecatedWithSetterPrefix(dep1, dep2, strings, numbers); - } - public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { - return (((((((("BuilderWithDeprecatedWithSetterPrefix.BuilderWithDeprecatedWithSetterPrefixBuilder(dep1=" + this.dep1) + ", dep2=") + this.dep2) + ", strings=") + this.strings) + ", numbers=") + this.numbers) + ")"); - } - } - String dep1; - @Deprecated int dep2; - @Singular @Deprecated java.util.List strings; - @Singular @Deprecated ImmutableList numbers; - @java.lang.SuppressWarnings("all") BuilderWithDeprecatedWithSetterPrefix(final String dep1, final int dep2, final java.util.List strings, final ImmutableList numbers) { - super(); - this.dep1 = dep1; - this.dep2 = dep2; - this.strings = strings; - this.numbers = numbers; - } - public static @java.lang.SuppressWarnings("all") BuilderWithDeprecatedWithSetterPrefixBuilder builder() { - return new BuilderWithDeprecatedWithSetterPrefixBuilder(); - } -} diff --git a/test/transform/resource/after-ecj/BuilderWithExistingBuilderClass.java b/test/transform/resource/after-ecj/BuilderWithExistingBuilderClass.java index 0e6ba335..f8f9ae6b 100644 --- a/test/transform/resource/after-ecj/BuilderWithExistingBuilderClass.java +++ b/test/transform/resource/after-ecj/BuilderWithExistingBuilderClass.java @@ -9,11 +9,11 @@ class BuilderWithExistingBuilderClass { @java.lang.SuppressWarnings("all") BuilderWithExistingBuilderClassBuilder() { super(); } - public @java.lang.SuppressWarnings("all") BuilderWithExistingBuilderClassBuilder arg1(final Z arg1) { + public @java.lang.SuppressWarnings("all") BuilderWithExistingBuilderClass.BuilderWithExistingBuilderClassBuilder arg1(final Z arg1) { this.arg1 = arg1; return this; } - public @java.lang.SuppressWarnings("all") BuilderWithExistingBuilderClassBuilder arg3(final String arg3) { + public @java.lang.SuppressWarnings("all") BuilderWithExistingBuilderClass.BuilderWithExistingBuilderClassBuilder arg3(final String arg3) { this.arg3 = arg3; return this; } @@ -30,7 +30,7 @@ class BuilderWithExistingBuilderClass { public static @Builder BuilderWithExistingBuilderClass staticMethod(Z arg1, boolean arg2, String arg3) { return null; } - public static @java.lang.SuppressWarnings("all") BuilderWithExistingBuilderClassBuilder builder() { - return new BuilderWithExistingBuilderClassBuilder(); + public static @java.lang.SuppressWarnings("all") BuilderWithExistingBuilderClass.BuilderWithExistingBuilderClassBuilder builder() { + return new BuilderWithExistingBuilderClass.BuilderWithExistingBuilderClassBuilder(); } } \ No newline at end of file diff --git a/test/transform/resource/after-ecj/BuilderWithExistingBuilderClassWithSetterPrefix.java b/test/transform/resource/after-ecj/BuilderWithExistingBuilderClassWithSetterPrefix.java index 8da2f012..a43841b8 100644 --- a/test/transform/resource/after-ecj/BuilderWithExistingBuilderClassWithSetterPrefix.java +++ b/test/transform/resource/after-ecj/BuilderWithExistingBuilderClassWithSetterPrefix.java @@ -9,11 +9,11 @@ class BuilderWithExistingBuilderClassWithSetterPrefix { @java.lang.SuppressWarnings("all") BuilderWithExistingBuilderClassWithSetterPrefixBuilder() { super(); } - public @java.lang.SuppressWarnings("all") BuilderWithExistingBuilderClassWithSetterPrefixBuilder withArg1(final Z arg1) { + public @java.lang.SuppressWarnings("all") BuilderWithExistingBuilderClassWithSetterPrefix.BuilderWithExistingBuilderClassWithSetterPrefixBuilder withArg1(final Z arg1) { this.arg1 = arg1; return this; } - public @java.lang.SuppressWarnings("all") BuilderWithExistingBuilderClassWithSetterPrefixBuilder withArg3(final String arg3) { + public @java.lang.SuppressWarnings("all") BuilderWithExistingBuilderClassWithSetterPrefix.BuilderWithExistingBuilderClassWithSetterPrefixBuilder withArg3(final String arg3) { this.arg3 = arg3; return this; } @@ -30,7 +30,7 @@ class BuilderWithExistingBuilderClassWithSetterPrefix { public static @Builder(setterPrefix = "with") BuilderWithExistingBuilderClassWithSetterPrefix staticMethod(Z arg1, boolean arg2, String arg3) { return null; } - public static @java.lang.SuppressWarnings("all") BuilderWithExistingBuilderClassWithSetterPrefixBuilder builder() { - return new BuilderWithExistingBuilderClassWithSetterPrefixBuilder(); + public static @java.lang.SuppressWarnings("all") BuilderWithExistingBuilderClassWithSetterPrefix.BuilderWithExistingBuilderClassWithSetterPrefixBuilder builder() { + return new BuilderWithExistingBuilderClassWithSetterPrefix.BuilderWithExistingBuilderClassWithSetterPrefixBuilder(); } } diff --git a/test/transform/resource/after-ecj/BuilderWithNoBuilderMethod.java b/test/transform/resource/after-ecj/BuilderWithNoBuilderMethod.java index 624b14b9..a7ef5dd6 100644 --- a/test/transform/resource/after-ecj/BuilderWithNoBuilderMethod.java +++ b/test/transform/resource/after-ecj/BuilderWithNoBuilderMethod.java @@ -5,7 +5,7 @@ import lombok.Builder; @java.lang.SuppressWarnings("all") BuilderWithNoBuilderMethodBuilder() { super(); } - public @java.lang.SuppressWarnings("all") BuilderWithNoBuilderMethodBuilder a(final String a) { + public @java.lang.SuppressWarnings("all") BuilderWithNoBuilderMethod.BuilderWithNoBuilderMethodBuilder a(final String a) { this.a = a; return this; } @@ -21,7 +21,7 @@ import lombok.Builder; super(); this.a = a; } - public @java.lang.SuppressWarnings("all") BuilderWithNoBuilderMethodBuilder toBuilder() { - return new BuilderWithNoBuilderMethodBuilder().a(this.a); + public @java.lang.SuppressWarnings("all") BuilderWithNoBuilderMethod.BuilderWithNoBuilderMethodBuilder toBuilder() { + return new BuilderWithNoBuilderMethod.BuilderWithNoBuilderMethodBuilder().a(this.a); } } diff --git a/test/transform/resource/after-ecj/BuilderWithNoBuilderMethodWithSetterPrefix.java b/test/transform/resource/after-ecj/BuilderWithNoBuilderMethodWithSetterPrefix.java deleted file mode 100644 index 30043dd9..00000000 --- a/test/transform/resource/after-ecj/BuilderWithNoBuilderMethodWithSetterPrefix.java +++ /dev/null @@ -1,27 +0,0 @@ -import lombok.Builder; -@Builder(toBuilder = true,builderMethodName = "",setterPrefix = "with") class BuilderWithNoBuilderMethodWithSetterPrefix { - public static @java.lang.SuppressWarnings("all") class BuilderWithNoBuilderMethodWithSetterPrefixBuilder { - private @java.lang.SuppressWarnings("all") String a; - @java.lang.SuppressWarnings("all") BuilderWithNoBuilderMethodWithSetterPrefixBuilder() { - super(); - } - public @java.lang.SuppressWarnings("all") BuilderWithNoBuilderMethodWithSetterPrefixBuilder withA(final String a) { - this.a = a; - return this; - } - public @java.lang.SuppressWarnings("all") BuilderWithNoBuilderMethodWithSetterPrefix build() { - return new BuilderWithNoBuilderMethodWithSetterPrefix(a); - } - public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { - return (("BuilderWithNoBuilderMethodWithSetterPrefix.BuilderWithNoBuilderMethodWithSetterPrefixBuilder(a=" + this.a) + ")"); - } - } - private String a = ""; - @java.lang.SuppressWarnings("all") BuilderWithNoBuilderMethodWithSetterPrefix(final String a) { - super(); - this.a = a; - } - public @java.lang.SuppressWarnings("all") BuilderWithNoBuilderMethodWithSetterPrefixBuilder toBuilder() { - return new BuilderWithNoBuilderMethodWithSetterPrefixBuilder().withA(this.a); - } -} diff --git a/test/transform/resource/after-ecj/BuilderWithNonNull.java b/test/transform/resource/after-ecj/BuilderWithNonNull.java index a8ef93f0..d105b45f 100644 --- a/test/transform/resource/after-ecj/BuilderWithNonNull.java +++ b/test/transform/resource/after-ecj/BuilderWithNonNull.java @@ -4,7 +4,7 @@ @java.lang.SuppressWarnings("all") BuilderWithNonNullBuilder() { super(); } - public @java.lang.SuppressWarnings("all") BuilderWithNonNullBuilder id(final @lombok.NonNull String id) { + public @java.lang.SuppressWarnings("all") BuilderWithNonNull.BuilderWithNonNullBuilder id(final @lombok.NonNull String id) { if ((id == null)) { throw new java.lang.NullPointerException("id is marked non-null but is null"); @@ -28,7 +28,7 @@ } this.id = id; } - public static @java.lang.SuppressWarnings("all") BuilderWithNonNullBuilder builder() { - return new BuilderWithNonNullBuilder(); + public static @java.lang.SuppressWarnings("all") BuilderWithNonNull.BuilderWithNonNullBuilder builder() { + return new BuilderWithNonNull.BuilderWithNonNullBuilder(); } } \ No newline at end of file diff --git a/test/transform/resource/after-ecj/BuilderWithNonNullWithSetterPrefix.java b/test/transform/resource/after-ecj/BuilderWithNonNullWithSetterPrefix.java index 7f8cb80b..8947f9d6 100644 --- a/test/transform/resource/after-ecj/BuilderWithNonNullWithSetterPrefix.java +++ b/test/transform/resource/after-ecj/BuilderWithNonNullWithSetterPrefix.java @@ -4,7 +4,7 @@ @java.lang.SuppressWarnings("all") BuilderWithNonNullWithSetterPrefixBuilder() { super(); } - public @java.lang.SuppressWarnings("all") BuilderWithNonNullWithSetterPrefixBuilder withId(final @lombok.NonNull String id) { + public @java.lang.SuppressWarnings("all") BuilderWithNonNullWithSetterPrefix.BuilderWithNonNullWithSetterPrefixBuilder withId(final @lombok.NonNull String id) { if ((id == null)) { throw new java.lang.NullPointerException("id is marked non-null but is null"); @@ -28,7 +28,7 @@ } this.id = id; } - public static @java.lang.SuppressWarnings("all") BuilderWithNonNullWithSetterPrefixBuilder builder() { - return new BuilderWithNonNullWithSetterPrefixBuilder(); + public static @java.lang.SuppressWarnings("all") BuilderWithNonNullWithSetterPrefix.BuilderWithNonNullWithSetterPrefixBuilder builder() { + return new BuilderWithNonNullWithSetterPrefix.BuilderWithNonNullWithSetterPrefixBuilder(); } } diff --git a/test/transform/resource/after-ecj/BuilderWithRecursiveGenerics.java b/test/transform/resource/after-ecj/BuilderWithRecursiveGenerics.java index 8246ca2c..962e2003 100644 --- a/test/transform/resource/after-ecj/BuilderWithRecursiveGenerics.java +++ b/test/transform/resource/after-ecj/BuilderWithRecursiveGenerics.java @@ -11,16 +11,16 @@ public class BuilderWithRecursiveGenerics { @java.lang.SuppressWarnings("all") TestBuilder() { super(); } - public @java.lang.SuppressWarnings("all") TestBuilder foo(final Foo foo) { + public @java.lang.SuppressWarnings("all") BuilderWithRecursiveGenerics.Test.TestBuilder foo(final Foo foo) { this.foo = foo; return this; } - public @java.lang.SuppressWarnings("all") TestBuilder bar(final Bar bar) { + public @java.lang.SuppressWarnings("all") BuilderWithRecursiveGenerics.Test.TestBuilder bar(final Bar bar) { this.bar = bar; return this; } - public @java.lang.SuppressWarnings("all") Test build() { - return new Test(foo, bar); + public @java.lang.SuppressWarnings("all") BuilderWithRecursiveGenerics.Test build() { + return new BuilderWithRecursiveGenerics.Test(foo, bar); } public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { return (((("BuilderWithRecursiveGenerics.Test.TestBuilder(foo=" + this.foo) + ", bar=") + this.bar) + ")"); @@ -33,8 +33,8 @@ public class BuilderWithRecursiveGenerics { this.foo = foo; this.bar = bar; } - public static @java.lang.SuppressWarnings("all") , Quz extends Inter>TestBuilder builder() { - return new TestBuilder(); + public static @java.lang.SuppressWarnings("all") , Quz extends Inter>BuilderWithRecursiveGenerics.Test.TestBuilder builder() { + return new BuilderWithRecursiveGenerics.Test.TestBuilder(); } public @java.lang.SuppressWarnings("all") Foo getFoo() { return this.foo; diff --git a/test/transform/resource/after-ecj/BuilderWithRecursiveGenericsWithSetterPrefix.java b/test/transform/resource/after-ecj/BuilderWithRecursiveGenericsWithSetterPrefix.java deleted file mode 100644 index 7c5b191d..00000000 --- a/test/transform/resource/after-ecj/BuilderWithRecursiveGenericsWithSetterPrefix.java +++ /dev/null @@ -1,78 +0,0 @@ -import java.util.Set; -import lombok.Builder; -import lombok.Value; -public class BuilderWithRecursiveGenericsWithSetterPrefix { - interface Inter> { - } - public static final @Builder(setterPrefix = "with") @Value class Test, Quz extends Inter> { - public static @java.lang.SuppressWarnings("all") class TestBuilder, Quz extends Inter> { - private @java.lang.SuppressWarnings("all") Foo foo; - private @java.lang.SuppressWarnings("all") Bar bar; - @java.lang.SuppressWarnings("all") TestBuilder() { - super(); - } - public @java.lang.SuppressWarnings("all") TestBuilder withFoo(final Foo foo) { - this.foo = foo; - return this; - } - public @java.lang.SuppressWarnings("all") TestBuilder withBar(final Bar bar) { - this.bar = bar; - return this; - } - public @java.lang.SuppressWarnings("all") Test build() { - return new Test(foo, bar); - } - public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { - return (((("BuilderWithRecursiveGenericsWithSetterPrefix.Test.TestBuilder(foo=" + this.foo) + ", bar=") + this.bar) + ")"); - } - } - private final Foo foo; - private final Bar bar; - @java.lang.SuppressWarnings("all") Test(final Foo foo, final Bar bar) { - super(); - this.foo = foo; - this.bar = bar; - } - public static @java.lang.SuppressWarnings("all") , Quz extends Inter>TestBuilder builder() { - return new TestBuilder(); - } - public @java.lang.SuppressWarnings("all") Foo getFoo() { - return this.foo; - } - public @java.lang.SuppressWarnings("all") Bar getBar() { - return this.bar; - } - public @java.lang.Override @java.lang.SuppressWarnings("all") boolean equals(final java.lang.Object o) { - if ((o == this)) - return true; - if ((! (o instanceof BuilderWithRecursiveGenericsWithSetterPrefix.Test))) - return false; - final BuilderWithRecursiveGenericsWithSetterPrefix.Test other = (BuilderWithRecursiveGenericsWithSetterPrefix.Test) o; - final java.lang.Object this$foo = this.getFoo(); - final java.lang.Object other$foo = other.getFoo(); - if (((this$foo == null) ? (other$foo != null) : (! this$foo.equals(other$foo)))) - return false; - final java.lang.Object this$bar = this.getBar(); - final java.lang.Object other$bar = other.getBar(); - if (((this$bar == null) ? (other$bar != null) : (! this$bar.equals(other$bar)))) - return false; - return true; - } - public @java.lang.Override @java.lang.SuppressWarnings("all") int hashCode() { - final int PRIME = 59; - int result = 1; - final java.lang.Object $foo = this.getFoo(); - result = ((result * PRIME) + (($foo == null) ? 43 : $foo.hashCode())); - final java.lang.Object $bar = this.getBar(); - result = ((result * PRIME) + (($bar == null) ? 43 : $bar.hashCode())); - return result; - } - public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { - return (((("BuilderWithRecursiveGenericsWithSetterPrefix.Test(foo=" + this.getFoo()) + ", bar=") + this.getBar()) + ")"); - } - } - public BuilderWithRecursiveGenericsWithSetterPrefix() { - super(); - } -} - diff --git a/test/transform/resource/after-ecj/BuilderWithToBuilder.java b/test/transform/resource/after-ecj/BuilderWithToBuilder.java index 7bcb54ac..83938adb 100644 --- a/test/transform/resource/after-ecj/BuilderWithToBuilder.java +++ b/test/transform/resource/after-ecj/BuilderWithToBuilder.java @@ -9,31 +9,31 @@ import lombok.Builder; @java.lang.SuppressWarnings("all") BuilderWithToBuilderBuilder() { super(); } - public @java.lang.SuppressWarnings("all") BuilderWithToBuilderBuilder one(final String one) { + public @java.lang.SuppressWarnings("all") BuilderWithToBuilder.BuilderWithToBuilderBuilder one(final String one) { this.one = one; return this; } - public @java.lang.SuppressWarnings("all") BuilderWithToBuilderBuilder two(final String two) { + public @java.lang.SuppressWarnings("all") BuilderWithToBuilder.BuilderWithToBuilderBuilder two(final String two) { this.two = two; return this; } - public @java.lang.SuppressWarnings("all") BuilderWithToBuilderBuilder foo(final T foo) { + public @java.lang.SuppressWarnings("all") BuilderWithToBuilder.BuilderWithToBuilderBuilder foo(final T foo) { this.foo = foo; return this; } - public @java.lang.SuppressWarnings("all") BuilderWithToBuilderBuilder bar(final T bar) { + public @java.lang.SuppressWarnings("all") BuilderWithToBuilder.BuilderWithToBuilderBuilder bar(final T bar) { if ((this.bars == null)) this.bars = new java.util.ArrayList(); this.bars.add(bar); return this; } - public @java.lang.SuppressWarnings("all") BuilderWithToBuilderBuilder bars(final java.util.Collection bars) { + public @java.lang.SuppressWarnings("all") BuilderWithToBuilder.BuilderWithToBuilderBuilder bars(final java.util.Collection bars) { if ((this.bars == null)) this.bars = new java.util.ArrayList(); this.bars.addAll(bars); return this; } - public @java.lang.SuppressWarnings("all") BuilderWithToBuilderBuilder clearBars() { + public @java.lang.SuppressWarnings("all") BuilderWithToBuilder.BuilderWithToBuilderBuilder clearBars() { if ((this.bars != null)) this.bars.clear(); return this; @@ -70,11 +70,11 @@ import lombok.Builder; this.foo = foo; this.bars = bars; } - public static @java.lang.SuppressWarnings("all") BuilderWithToBuilderBuilder builder() { - return new BuilderWithToBuilderBuilder(); + public static @java.lang.SuppressWarnings("all") BuilderWithToBuilder.BuilderWithToBuilderBuilder builder() { + return new BuilderWithToBuilder.BuilderWithToBuilderBuilder(); } - public @java.lang.SuppressWarnings("all") BuilderWithToBuilderBuilder toBuilder() { - final BuilderWithToBuilderBuilder builder = new BuilderWithToBuilderBuilder().one(this.mOne).two(this.mTwo).foo(BuilderWithToBuilder.rrr(this)); + public @java.lang.SuppressWarnings("all") BuilderWithToBuilder.BuilderWithToBuilderBuilder toBuilder() { + final BuilderWithToBuilder.BuilderWithToBuilderBuilder builder = new BuilderWithToBuilder.BuilderWithToBuilderBuilder().one(this.mOne).two(this.mTwo).foo(BuilderWithToBuilder.rrr(this)); if ((this.bars != null)) builder.bars(this.bars); return builder; @@ -88,15 +88,15 @@ import lombok.Builder; @java.lang.SuppressWarnings("all") ConstructorWithToBuilderBuilder() { super(); } - public @java.lang.SuppressWarnings("all") ConstructorWithToBuilderBuilder mOne(final String mOne) { + public @java.lang.SuppressWarnings("all") ConstructorWithToBuilder.ConstructorWithToBuilderBuilder mOne(final String mOne) { this.mOne = mOne; return this; } - public @java.lang.SuppressWarnings("all") ConstructorWithToBuilderBuilder baz(final T baz) { + public @java.lang.SuppressWarnings("all") ConstructorWithToBuilder.ConstructorWithToBuilderBuilder baz(final T baz) { this.baz = baz; return this; } - public @java.lang.SuppressWarnings("all") ConstructorWithToBuilderBuilder bars(final com.google.common.collect.ImmutableList bars) { + public @java.lang.SuppressWarnings("all") ConstructorWithToBuilder.ConstructorWithToBuilderBuilder bars(final com.google.common.collect.ImmutableList bars) { this.bars = bars; return this; } @@ -114,10 +114,10 @@ import lombok.Builder; public @Builder(toBuilder = true) ConstructorWithToBuilder(String mOne, @Builder.ObtainVia(field = "foo") T baz, com.google.common.collect.ImmutableList bars) { super(); } - public static @java.lang.SuppressWarnings("all") ConstructorWithToBuilderBuilder builder() { - return new ConstructorWithToBuilderBuilder(); + public static @java.lang.SuppressWarnings("all") ConstructorWithToBuilder.ConstructorWithToBuilderBuilder builder() { + return new ConstructorWithToBuilder.ConstructorWithToBuilderBuilder(); } - public @java.lang.SuppressWarnings("all") ConstructorWithToBuilderBuilder toBuilder() { - return new ConstructorWithToBuilderBuilder().mOne(this.mOne).baz(this.foo).bars(this.bars); + public @java.lang.SuppressWarnings("all") ConstructorWithToBuilder.ConstructorWithToBuilderBuilder toBuilder() { + return new ConstructorWithToBuilder.ConstructorWithToBuilderBuilder().mOne(this.mOne).baz(this.foo).bars(this.bars); } } diff --git a/test/transform/resource/after-ecj/BuilderWithToBuilderWithSetterPrefix.java b/test/transform/resource/after-ecj/BuilderWithToBuilderWithSetterPrefix.java deleted file mode 100644 index 6f3906d9..00000000 --- a/test/transform/resource/after-ecj/BuilderWithToBuilderWithSetterPrefix.java +++ /dev/null @@ -1,124 +0,0 @@ -import java.util.List; -import lombok.Builder; -@Builder(toBuilder = true,setterPrefix = "with") @lombok.experimental.Accessors(prefix = "m") class BuilderWithToBuilderWithSetterPrefix { - public static @java.lang.SuppressWarnings("all") class BuilderWithToBuilderWithSetterPrefixBuilder { - private @java.lang.SuppressWarnings("all") String one; - private @java.lang.SuppressWarnings("all") String two; - private @java.lang.SuppressWarnings("all") T foo; - private @java.lang.SuppressWarnings("all") java.util.ArrayList bars; - @java.lang.SuppressWarnings("all") BuilderWithToBuilderWithSetterPrefixBuilder() { - super(); - } - public @java.lang.SuppressWarnings("all") BuilderWithToBuilderWithSetterPrefixBuilder withOne(final String one) { - this.one = one; - return this; - } - public @java.lang.SuppressWarnings("all") BuilderWithToBuilderWithSetterPrefixBuilder withTwo(final String two) { - this.two = two; - return this; - } - public @java.lang.SuppressWarnings("all") BuilderWithToBuilderWithSetterPrefixBuilder withFoo(final T foo) { - this.foo = foo; - return this; - } - public @java.lang.SuppressWarnings("all") BuilderWithToBuilderWithSetterPrefixBuilder withBar(final T bar) { - if ((this.bars == null)) - this.bars = new java.util.ArrayList(); - this.bars.add(bar); - return this; - } - public @java.lang.SuppressWarnings("all") BuilderWithToBuilderWithSetterPrefixBuilder withBars(final java.util.Collection bars) { - if ((this.bars == null)) - this.bars = new java.util.ArrayList(); - this.bars.addAll(bars); - return this; - } - public @java.lang.SuppressWarnings("all") BuilderWithToBuilderWithSetterPrefixBuilder clearBars() { - if ((this.bars != null)) - this.bars.clear(); - return this; - } - public @java.lang.SuppressWarnings("all") BuilderWithToBuilderWithSetterPrefix build() { - java.util.List bars; - switch (((this.bars == null) ? 0 : this.bars.size())) { - case 0 : - bars = java.util.Collections.emptyList(); - break; - case 1 : - bars = java.util.Collections.singletonList(this.bars.get(0)); - break; - default : - bars = java.util.Collections.unmodifiableList(new java.util.ArrayList(this.bars)); - } - return new BuilderWithToBuilderWithSetterPrefix(one, two, foo, bars); - } - public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { - return (((((((("BuilderWithToBuilderWithSetterPrefix.BuilderWithToBuilderWithSetterPrefixBuilder(one=" + this.one) + ", two=") + this.two) + ", foo=") + this.foo) + ", bars=") + this.bars) + ")"); - } - } - private String mOne; - private String mTwo; - private @Builder.ObtainVia(method = "rrr",isStatic = true) T foo; - private @lombok.Singular List bars; - public static K rrr(BuilderWithToBuilderWithSetterPrefix x) { - return x.foo; - } - @java.lang.SuppressWarnings("all") BuilderWithToBuilderWithSetterPrefix(final String one, final String two, final T foo, final List bars) { - super(); - this.mOne = one; - this.mTwo = two; - this.foo = foo; - this.bars = bars; - } - public static @java.lang.SuppressWarnings("all") BuilderWithToBuilderWithSetterPrefixBuilder builder() { - return new BuilderWithToBuilderWithSetterPrefixBuilder(); - } - public @java.lang.SuppressWarnings("all") BuilderWithToBuilderWithSetterPrefixBuilder toBuilder() { - final BuilderWithToBuilderWithSetterPrefixBuilder builder = new BuilderWithToBuilderWithSetterPrefixBuilder().withOne(this.mOne).withTwo(this.mTwo).withFoo(BuilderWithToBuilderWithSetterPrefix.rrr(this)); - if ((this.bars != null)) - builder.withBars(this.bars); - return builder; - } -} - -@lombok.experimental.Accessors(prefix = "m") class ConstructorWithToBuilderWithSetterPrefix { - public static @java.lang.SuppressWarnings("all") class ConstructorWithToBuilderWithSetterPrefixBuilder { - private @java.lang.SuppressWarnings("all") String mOne; - private @java.lang.SuppressWarnings("all") T baz; - private @java.lang.SuppressWarnings("all") com.google.common.collect.ImmutableList bars; - @java.lang.SuppressWarnings("all") ConstructorWithToBuilderWithSetterPrefixBuilder() { - super(); - } - public @java.lang.SuppressWarnings("all") ConstructorWithToBuilderWithSetterPrefixBuilder withMOne(final String mOne) { - this.mOne = mOne; - return this; - } - public @java.lang.SuppressWarnings("all") ConstructorWithToBuilderWithSetterPrefixBuilder withBaz(final T baz) { - this.baz = baz; - return this; - } - public @java.lang.SuppressWarnings("all") ConstructorWithToBuilderWithSetterPrefixBuilder withBars(final com.google.common.collect.ImmutableList bars) { - this.bars = bars; - return this; - } - public @java.lang.SuppressWarnings("all") ConstructorWithToBuilderWithSetterPrefix build() { - return new ConstructorWithToBuilderWithSetterPrefix(mOne, baz, bars); - } - public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { - return (((((("ConstructorWithToBuilderWithSetterPrefix.ConstructorWithToBuilderWithSetterPrefixBuilder(mOne=" + this.mOne) + ", baz=") + this.baz) + ", bars=") + this.bars) + ")"); - } - } - private String mOne; - private String mTwo; - private T foo; - private @lombok.Singular com.google.common.collect.ImmutableList bars; - public @Builder(toBuilder = true,setterPrefix = "with") ConstructorWithToBuilderWithSetterPrefix(String mOne, @Builder.ObtainVia(field = "foo") T baz, com.google.common.collect.ImmutableList bars) { - super(); - } - public static @java.lang.SuppressWarnings("all") ConstructorWithToBuilderWithSetterPrefixBuilder builder() { - return new ConstructorWithToBuilderWithSetterPrefixBuilder(); - } - public @java.lang.SuppressWarnings("all") ConstructorWithToBuilderWithSetterPrefixBuilder toBuilder() { - return new ConstructorWithToBuilderWithSetterPrefixBuilder().withMOne(this.mOne).withBaz(this.foo).withBars(this.bars); - } -} diff --git a/test/transform/resource/after-ecj/BuilderWithTolerate.java b/test/transform/resource/after-ecj/BuilderWithTolerate.java index b64fd49a..3878ba27 100644 --- a/test/transform/resource/after-ecj/BuilderWithTolerate.java +++ b/test/transform/resource/after-ecj/BuilderWithTolerate.java @@ -9,7 +9,7 @@ public @Builder class BuilderWithTolerate { @java.lang.SuppressWarnings("all") BuilderWithTolerateBuilder() { super(); } - public @java.lang.SuppressWarnings("all") BuilderWithTolerateBuilder value(final int value) { + public @java.lang.SuppressWarnings("all") BuilderWithTolerate.BuilderWithTolerateBuilder value(final int value) { this.value = value; return this; } @@ -28,7 +28,7 @@ public @Builder class BuilderWithTolerate { super(); this.value = value; } - public static @java.lang.SuppressWarnings("all") BuilderWithTolerateBuilder builder() { - return new BuilderWithTolerateBuilder(); + public static @java.lang.SuppressWarnings("all") BuilderWithTolerate.BuilderWithTolerateBuilder builder() { + return new BuilderWithTolerate.BuilderWithTolerateBuilder(); } } \ No newline at end of file diff --git a/test/transform/resource/after-ecj/BuilderWithTolerateWithSetterPrefix.java b/test/transform/resource/after-ecj/BuilderWithTolerateWithSetterPrefix.java deleted file mode 100644 index 6fa302e5..00000000 --- a/test/transform/resource/after-ecj/BuilderWithTolerateWithSetterPrefix.java +++ /dev/null @@ -1,34 +0,0 @@ -import lombok.Builder; -import lombok.experimental.Tolerate; -public @Builder(setterPrefix = "with") class BuilderWithTolerateWithSetterPrefix { - public static class BuilderWithTolerateWithSetterPrefixBuilder { - private @java.lang.SuppressWarnings("all") int value; - public @Tolerate BuilderWithTolerateWithSetterPrefixBuilder withValue(String s) { - return this.withValue(Integer.parseInt(s)); - } - @java.lang.SuppressWarnings("all") BuilderWithTolerateWithSetterPrefixBuilder() { - super(); - } - public @java.lang.SuppressWarnings("all") BuilderWithTolerateWithSetterPrefixBuilder withValue(final int value) { - this.value = value; - return this; - } - public @java.lang.SuppressWarnings("all") BuilderWithTolerateWithSetterPrefix build() { - return new BuilderWithTolerateWithSetterPrefix(value); - } - public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { - return (("BuilderWithTolerateWithSetterPrefix.BuilderWithTolerateWithSetterPrefixBuilder(value=" + this.value) + ")"); - } - } - private final int value; - public static void main(String[] args) { - BuilderWithTolerateWithSetterPrefix.builder().withValue("42").build(); - } - @java.lang.SuppressWarnings("all") BuilderWithTolerateWithSetterPrefix(final int value) { - super(); - this.value = value; - } - public static @java.lang.SuppressWarnings("all") BuilderWithTolerateWithSetterPrefixBuilder builder() { - return new BuilderWithTolerateWithSetterPrefixBuilder(); - } -} diff --git a/test/transform/resource/after-ecj/CheckerFrameworkBuilder.java b/test/transform/resource/after-ecj/CheckerFrameworkBuilder.java index 2baad9d9..afe4bb0e 100644 --- a/test/transform/resource/after-ecj/CheckerFrameworkBuilder.java +++ b/test/transform/resource/after-ecj/CheckerFrameworkBuilder.java @@ -11,37 +11,37 @@ import lombok.Singular; @org.checkerframework.common.aliasing.qual.Unique @java.lang.SuppressWarnings("all") CheckerFrameworkBuilderBuilder() { super(); } - public @org.checkerframework.checker.builder.qual.ReturnsReceiver @java.lang.SuppressWarnings("all") CheckerFrameworkBuilderBuilder x(final @org.checkerframework.checker.builder.qual.NotCalledMethods("x") CheckerFrameworkBuilderBuilder this, final int x) { + public @org.checkerframework.checker.builder.qual.ReturnsReceiver @java.lang.SuppressWarnings("all") CheckerFrameworkBuilder.CheckerFrameworkBuilderBuilder x(final @org.checkerframework.checker.builder.qual.NotCalledMethods("x") CheckerFrameworkBuilder.CheckerFrameworkBuilderBuilder this, final int x) { this.x$value = x; x$set = true; return this; } - public @org.checkerframework.checker.builder.qual.ReturnsReceiver @java.lang.SuppressWarnings("all") CheckerFrameworkBuilderBuilder y(final @org.checkerframework.checker.builder.qual.NotCalledMethods("y") CheckerFrameworkBuilderBuilder this, final int y) { + public @org.checkerframework.checker.builder.qual.ReturnsReceiver @java.lang.SuppressWarnings("all") CheckerFrameworkBuilder.CheckerFrameworkBuilderBuilder y(final @org.checkerframework.checker.builder.qual.NotCalledMethods("y") CheckerFrameworkBuilder.CheckerFrameworkBuilderBuilder this, final int y) { this.y = y; return this; } - public @org.checkerframework.checker.builder.qual.ReturnsReceiver @java.lang.SuppressWarnings("all") CheckerFrameworkBuilderBuilder z(final @org.checkerframework.checker.builder.qual.NotCalledMethods("z") CheckerFrameworkBuilderBuilder this, final int z) { + public @org.checkerframework.checker.builder.qual.ReturnsReceiver @java.lang.SuppressWarnings("all") CheckerFrameworkBuilder.CheckerFrameworkBuilderBuilder z(final @org.checkerframework.checker.builder.qual.NotCalledMethods("z") CheckerFrameworkBuilder.CheckerFrameworkBuilderBuilder this, final int z) { this.z = z; return this; } - public @org.checkerframework.checker.builder.qual.ReturnsReceiver @java.lang.SuppressWarnings("all") CheckerFrameworkBuilderBuilder name(final String name) { + public @org.checkerframework.checker.builder.qual.ReturnsReceiver @java.lang.SuppressWarnings("all") CheckerFrameworkBuilder.CheckerFrameworkBuilderBuilder name(final String name) { if ((this.names == null)) this.names = new java.util.ArrayList(); this.names.add(name); return this; } - public @org.checkerframework.checker.builder.qual.ReturnsReceiver @java.lang.SuppressWarnings("all") CheckerFrameworkBuilderBuilder names(final java.util.Collection names) { + public @org.checkerframework.checker.builder.qual.ReturnsReceiver @java.lang.SuppressWarnings("all") CheckerFrameworkBuilder.CheckerFrameworkBuilderBuilder names(final java.util.Collection names) { if ((this.names == null)) this.names = new java.util.ArrayList(); this.names.addAll(names); return this; } - public @org.checkerframework.checker.builder.qual.ReturnsReceiver @java.lang.SuppressWarnings("all") CheckerFrameworkBuilderBuilder clearNames() { + public @org.checkerframework.checker.builder.qual.ReturnsReceiver @java.lang.SuppressWarnings("all") CheckerFrameworkBuilder.CheckerFrameworkBuilderBuilder clearNames() { if ((this.names != null)) this.names.clear(); return this; } - public @org.checkerframework.dataflow.qual.SideEffectFree @java.lang.SuppressWarnings("all") CheckerFrameworkBuilder build(final @org.checkerframework.checker.builder.qual.CalledMethods({"y", "z"}) CheckerFrameworkBuilderBuilder this) { + public @org.checkerframework.dataflow.qual.SideEffectFree @java.lang.SuppressWarnings("all") CheckerFrameworkBuilder build(final @org.checkerframework.checker.builder.qual.CalledMethods({"y", "z"}) CheckerFrameworkBuilder.CheckerFrameworkBuilderBuilder this) { java.util.List names; switch (((this.names == null) ? 0 : this.names.size())) { case 0 : @@ -73,7 +73,7 @@ import lombok.Singular; this.z = z; this.names = names; } - public static @org.checkerframework.common.aliasing.qual.Unique @org.checkerframework.dataflow.qual.SideEffectFree @java.lang.SuppressWarnings("all") CheckerFrameworkBuilderBuilder builder() { - return new CheckerFrameworkBuilderBuilder(); + public static @org.checkerframework.common.aliasing.qual.Unique @org.checkerframework.dataflow.qual.SideEffectFree @java.lang.SuppressWarnings("all") CheckerFrameworkBuilder.CheckerFrameworkBuilderBuilder builder() { + return new CheckerFrameworkBuilder.CheckerFrameworkBuilderBuilder(); } } \ No newline at end of file diff --git a/test/transform/resource/after-ecj/CheckerFrameworkSuperBuilder.java b/test/transform/resource/after-ecj/CheckerFrameworkSuperBuilder.java index ffbcf44e..1849419e 100644 --- a/test/transform/resource/after-ecj/CheckerFrameworkSuperBuilder.java +++ b/test/transform/resource/after-ecj/CheckerFrameworkSuperBuilder.java @@ -2,7 +2,7 @@ import java.util.List; import lombok.Singular; class CheckerFrameworkSuperBuilder { public static @lombok.experimental.SuperBuilder class Parent { - public static abstract @java.lang.SuppressWarnings("all") class ParentBuilder> { + public static abstract @java.lang.SuppressWarnings("all") class ParentBuilder> { private @java.lang.SuppressWarnings("all") int x$value; private @java.lang.SuppressWarnings("all") boolean x$set; private @java.lang.SuppressWarnings("all") int y; @@ -11,17 +11,17 @@ class CheckerFrameworkSuperBuilder { public ParentBuilder() { } protected abstract @org.checkerframework.checker.builder.qual.ReturnsReceiver @org.checkerframework.dataflow.qual.SideEffectFree @java.lang.SuppressWarnings("all") B self(); - public abstract @org.checkerframework.dataflow.qual.SideEffectFree @java.lang.SuppressWarnings("all") C build(final @org.checkerframework.checker.builder.qual.CalledMethods({"y", "z"}) ParentBuilder this); - public @org.checkerframework.checker.builder.qual.ReturnsReceiver @java.lang.SuppressWarnings("all") B x(final @org.checkerframework.checker.builder.qual.NotCalledMethods("x") ParentBuilder this, final int x) { + public abstract @org.checkerframework.dataflow.qual.SideEffectFree @java.lang.SuppressWarnings("all") C build(final @org.checkerframework.checker.builder.qual.CalledMethods({"y", "z"}) CheckerFrameworkSuperBuilder.Parent.ParentBuilder this); + public @org.checkerframework.checker.builder.qual.ReturnsReceiver @java.lang.SuppressWarnings("all") B x(final @org.checkerframework.checker.builder.qual.NotCalledMethods("x") CheckerFrameworkSuperBuilder.Parent.ParentBuilder this, final int x) { this.x$value = x; x$set = true; return self(); } - public @org.checkerframework.checker.builder.qual.ReturnsReceiver @java.lang.SuppressWarnings("all") B y(final @org.checkerframework.checker.builder.qual.NotCalledMethods("y") ParentBuilder this, final int y) { + public @org.checkerframework.checker.builder.qual.ReturnsReceiver @java.lang.SuppressWarnings("all") B y(final @org.checkerframework.checker.builder.qual.NotCalledMethods("y") CheckerFrameworkSuperBuilder.Parent.ParentBuilder this, final int y) { this.y = y; return self(); } - public @org.checkerframework.checker.builder.qual.ReturnsReceiver @java.lang.SuppressWarnings("all") B z(final @org.checkerframework.checker.builder.qual.NotCalledMethods("z") ParentBuilder this, final int z) { + public @org.checkerframework.checker.builder.qual.ReturnsReceiver @java.lang.SuppressWarnings("all") B z(final @org.checkerframework.checker.builder.qual.NotCalledMethods("z") CheckerFrameworkSuperBuilder.Parent.ParentBuilder this, final int z) { this.z = z; return self(); } @@ -46,14 +46,14 @@ class CheckerFrameworkSuperBuilder { return (((((((("CheckerFrameworkSuperBuilder.Parent.ParentBuilder(x$value=" + this.x$value) + ", y=") + this.y) + ", z=") + this.z) + ", names=") + this.names) + ")"); } } - private static final @java.lang.SuppressWarnings("all") class ParentBuilderImpl extends ParentBuilder { + private static final @java.lang.SuppressWarnings("all") class ParentBuilderImpl extends CheckerFrameworkSuperBuilder.Parent.ParentBuilder { private ParentBuilderImpl() { } - protected @java.lang.Override @org.checkerframework.checker.builder.qual.ReturnsReceiver @org.checkerframework.dataflow.qual.SideEffectFree @java.lang.SuppressWarnings("all") ParentBuilderImpl self() { + protected @java.lang.Override @org.checkerframework.checker.builder.qual.ReturnsReceiver @org.checkerframework.dataflow.qual.SideEffectFree @java.lang.SuppressWarnings("all") CheckerFrameworkSuperBuilder.Parent.ParentBuilderImpl self() { return this; } - public @java.lang.Override @org.checkerframework.dataflow.qual.SideEffectFree @java.lang.SuppressWarnings("all") Parent build(final @org.checkerframework.checker.builder.qual.CalledMethods({"y", "z"}) ParentBuilderImpl this) { - return new Parent(this); + public @java.lang.Override @org.checkerframework.dataflow.qual.SideEffectFree @java.lang.SuppressWarnings("all") CheckerFrameworkSuperBuilder.Parent build(final @org.checkerframework.checker.builder.qual.CalledMethods({"y", "z"}) CheckerFrameworkSuperBuilder.Parent.ParentBuilderImpl this) { + return new CheckerFrameworkSuperBuilder.Parent(this); } } @lombok.Builder.Default int x; @@ -63,12 +63,12 @@ class CheckerFrameworkSuperBuilder { private static @java.lang.SuppressWarnings("all") int $default$x() { return 5; } - protected @org.checkerframework.common.aliasing.qual.Unique @java.lang.SuppressWarnings("all") Parent(final ParentBuilder b) { + protected @org.checkerframework.common.aliasing.qual.Unique @java.lang.SuppressWarnings("all") Parent(final CheckerFrameworkSuperBuilder.Parent.ParentBuilder b) { super(); if (b.x$set) this.x = b.x$value; else - this.x = Parent.$default$x(); + this.x = CheckerFrameworkSuperBuilder.Parent.$default$x(); this.y = b.y; this.z = b.z; java.util.List names; @@ -84,25 +84,25 @@ class CheckerFrameworkSuperBuilder { } this.names = names; } - public static @org.checkerframework.common.aliasing.qual.Unique @java.lang.SuppressWarnings("all") ParentBuilder builder() { - return new ParentBuilderImpl(); + public static @org.checkerframework.common.aliasing.qual.Unique @java.lang.SuppressWarnings("all") CheckerFrameworkSuperBuilder.Parent.ParentBuilder builder() { + return new CheckerFrameworkSuperBuilder.Parent.ParentBuilderImpl(); } } public static @lombok.experimental.SuperBuilder class Child extends Parent { - public static abstract @java.lang.SuppressWarnings("all") class ChildBuilder> extends Parent.ParentBuilder { + public static abstract @java.lang.SuppressWarnings("all") class ChildBuilder> extends Parent.ParentBuilder { private @java.lang.SuppressWarnings("all") int a$value; private @java.lang.SuppressWarnings("all") boolean a$set; private @java.lang.SuppressWarnings("all") int b; public ChildBuilder() { } protected abstract @java.lang.Override @org.checkerframework.checker.builder.qual.ReturnsReceiver @org.checkerframework.dataflow.qual.SideEffectFree @java.lang.SuppressWarnings("all") B self(); - public abstract @java.lang.Override @org.checkerframework.dataflow.qual.SideEffectFree @java.lang.SuppressWarnings("all") C build(final @org.checkerframework.checker.builder.qual.CalledMethods("b") ChildBuilder this); - public @org.checkerframework.checker.builder.qual.ReturnsReceiver @java.lang.SuppressWarnings("all") B a(final @org.checkerframework.checker.builder.qual.NotCalledMethods("a") ChildBuilder this, final int a) { + public abstract @java.lang.Override @org.checkerframework.dataflow.qual.SideEffectFree @java.lang.SuppressWarnings("all") C build(final @org.checkerframework.checker.builder.qual.CalledMethods("b") CheckerFrameworkSuperBuilder.Child.ChildBuilder this); + public @org.checkerframework.checker.builder.qual.ReturnsReceiver @java.lang.SuppressWarnings("all") B a(final @org.checkerframework.checker.builder.qual.NotCalledMethods("a") CheckerFrameworkSuperBuilder.Child.ChildBuilder this, final int a) { this.a$value = a; a$set = true; return self(); } - public @org.checkerframework.checker.builder.qual.ReturnsReceiver @java.lang.SuppressWarnings("all") B b(final @org.checkerframework.checker.builder.qual.NotCalledMethods("b") ChildBuilder this, final int b) { + public @org.checkerframework.checker.builder.qual.ReturnsReceiver @java.lang.SuppressWarnings("all") B b(final @org.checkerframework.checker.builder.qual.NotCalledMethods("b") CheckerFrameworkSuperBuilder.Child.ChildBuilder this, final int b) { this.b = b; return self(); } @@ -110,14 +110,14 @@ class CheckerFrameworkSuperBuilder { return (((((("CheckerFrameworkSuperBuilder.Child.ChildBuilder(super=" + super.toString()) + ", a$value=") + this.a$value) + ", b=") + this.b) + ")"); } } - private static final @java.lang.SuppressWarnings("all") class ChildBuilderImpl extends ChildBuilder { + private static final @java.lang.SuppressWarnings("all") class ChildBuilderImpl extends CheckerFrameworkSuperBuilder.Child.ChildBuilder { private ChildBuilderImpl() { } - protected @java.lang.Override @org.checkerframework.checker.builder.qual.ReturnsReceiver @org.checkerframework.dataflow.qual.SideEffectFree @java.lang.SuppressWarnings("all") ChildBuilderImpl self() { + protected @java.lang.Override @org.checkerframework.checker.builder.qual.ReturnsReceiver @org.checkerframework.dataflow.qual.SideEffectFree @java.lang.SuppressWarnings("all") CheckerFrameworkSuperBuilder.Child.ChildBuilderImpl self() { return this; } - public @java.lang.Override @org.checkerframework.dataflow.qual.SideEffectFree @java.lang.SuppressWarnings("all") Child build(final @org.checkerframework.checker.builder.qual.CalledMethods("b") ChildBuilderImpl this) { - return new Child(this); + public @java.lang.Override @org.checkerframework.dataflow.qual.SideEffectFree @java.lang.SuppressWarnings("all") CheckerFrameworkSuperBuilder.Child build(final @org.checkerframework.checker.builder.qual.CalledMethods("b") CheckerFrameworkSuperBuilder.Child.ChildBuilderImpl this) { + return new CheckerFrameworkSuperBuilder.Child(this); } } @lombok.Builder.Default int a; @@ -125,16 +125,16 @@ class CheckerFrameworkSuperBuilder { private static @java.lang.SuppressWarnings("all") int $default$a() { return 1; } - protected @org.checkerframework.common.aliasing.qual.Unique @java.lang.SuppressWarnings("all") Child(final ChildBuilder b) { + protected @org.checkerframework.common.aliasing.qual.Unique @java.lang.SuppressWarnings("all") Child(final CheckerFrameworkSuperBuilder.Child.ChildBuilder b) { super(b); if (b.a$set) this.a = b.a$value; else - this.a = Child.$default$a(); + this.a = CheckerFrameworkSuperBuilder.Child.$default$a(); this.b = b.b; } - public static @org.checkerframework.common.aliasing.qual.Unique @java.lang.SuppressWarnings("all") ChildBuilder builder() { - return new ChildBuilderImpl(); + public static @org.checkerframework.common.aliasing.qual.Unique @java.lang.SuppressWarnings("all") CheckerFrameworkSuperBuilder.Child.ChildBuilder builder() { + return new CheckerFrameworkSuperBuilder.Child.ChildBuilderImpl(); } } CheckerFrameworkSuperBuilder() { diff --git a/test/transform/resource/after-ecj/ConstructorsWithBuilderDefaults.java b/test/transform/resource/after-ecj/ConstructorsWithBuilderDefaults.java index fd860c69..94d06d93 100644 --- a/test/transform/resource/after-ecj/ConstructorsWithBuilderDefaults.java +++ b/test/transform/resource/after-ecj/ConstructorsWithBuilderDefaults.java @@ -10,12 +10,12 @@ final @NoArgsConstructor(force = true) @AllArgsConstructor @Builder @Value class @java.lang.SuppressWarnings("all") ConstructorsWithBuilderDefaultsBuilder() { super(); } - public @java.lang.SuppressWarnings("all") ConstructorsWithBuilderDefaultsBuilder x(final int x) { + public @java.lang.SuppressWarnings("all") ConstructorsWithBuilderDefaults.ConstructorsWithBuilderDefaultsBuilder x(final int x) { this.x$value = x; x$set = true; return this; } - public @java.lang.SuppressWarnings("all") ConstructorsWithBuilderDefaultsBuilder y(final int y) { + public @java.lang.SuppressWarnings("all") ConstructorsWithBuilderDefaults.ConstructorsWithBuilderDefaultsBuilder y(final int y) { this.y = y; return this; } @@ -31,8 +31,8 @@ final @NoArgsConstructor(force = true) @AllArgsConstructor @Builder @Value class private static @java.lang.SuppressWarnings("all") int $default$x() { return 5; } - public static @java.lang.SuppressWarnings("all") ConstructorsWithBuilderDefaultsBuilder builder() { - return new ConstructorsWithBuilderDefaultsBuilder(); + public static @java.lang.SuppressWarnings("all") ConstructorsWithBuilderDefaults.ConstructorsWithBuilderDefaultsBuilder builder() { + return new ConstructorsWithBuilderDefaults.ConstructorsWithBuilderDefaultsBuilder(); } public @java.lang.SuppressWarnings("all") int getX() { return this.x; diff --git a/test/transform/resource/after-ecj/ConstructorsWithBuilderDefaults2.java b/test/transform/resource/after-ecj/ConstructorsWithBuilderDefaults2.java index 776899fb..b8040d02 100644 --- a/test/transform/resource/after-ecj/ConstructorsWithBuilderDefaults2.java +++ b/test/transform/resource/after-ecj/ConstructorsWithBuilderDefaults2.java @@ -11,17 +11,17 @@ final @Builder @Value class ConstructorsWithBuilderDefaults { @java.lang.SuppressWarnings("all") ConstructorsWithBuilderDefaultsBuilder() { super(); } - public @java.lang.SuppressWarnings("all") ConstructorsWithBuilderDefaultsBuilder z(final java.util.List z) { + public @java.lang.SuppressWarnings("all") ConstructorsWithBuilderDefaults.ConstructorsWithBuilderDefaultsBuilder z(final java.util.List z) { this.z$value = z; z$set = true; return this; } - public @java.lang.SuppressWarnings("all") ConstructorsWithBuilderDefaultsBuilder x(final T x) { + public @java.lang.SuppressWarnings("all") ConstructorsWithBuilderDefaults.ConstructorsWithBuilderDefaultsBuilder x(final T x) { this.x$value = x; x$set = true; return this; } - public @java.lang.SuppressWarnings("all") ConstructorsWithBuilderDefaultsBuilder q(final T q) { + public @java.lang.SuppressWarnings("all") ConstructorsWithBuilderDefaults.ConstructorsWithBuilderDefaultsBuilder q(final T q) { this.q = q; return this; } @@ -47,8 +47,8 @@ final @Builder @Value class ConstructorsWithBuilderDefaults { this.x = x; this.q = q; } - public static @java.lang.SuppressWarnings("all") ConstructorsWithBuilderDefaultsBuilder builder() { - return new ConstructorsWithBuilderDefaultsBuilder(); + public static @java.lang.SuppressWarnings("all") ConstructorsWithBuilderDefaults.ConstructorsWithBuilderDefaultsBuilder builder() { + return new ConstructorsWithBuilderDefaults.ConstructorsWithBuilderDefaultsBuilder(); } public @java.lang.SuppressWarnings("all") java.util.List getZ() { return this.z; diff --git a/test/transform/resource/after-ecj/JacksonJsonProperty.java b/test/transform/resource/after-ecj/JacksonJsonProperty.java index c0485251..83bb4807 100644 --- a/test/transform/resource/after-ecj/JacksonJsonProperty.java +++ b/test/transform/resource/after-ecj/JacksonJsonProperty.java @@ -9,7 +9,7 @@ public @Builder class JacksonJsonProperty { @java.lang.SuppressWarnings("all") JacksonJsonPropertyBuilder() { super(); } - public @JsonProperty("kebab-case-prop") @JsonSetter(nulls = Nulls.SKIP) @java.lang.SuppressWarnings("all") JacksonJsonPropertyBuilder kebabCaseProp(final String kebabCaseProp) { + public @JsonProperty("kebab-case-prop") @JsonSetter(nulls = Nulls.SKIP) @java.lang.SuppressWarnings("all") JacksonJsonProperty.JacksonJsonPropertyBuilder kebabCaseProp(final String kebabCaseProp) { this.kebabCaseProp = kebabCaseProp; return this; } @@ -25,8 +25,8 @@ public @Builder class JacksonJsonProperty { super(); this.kebabCaseProp = kebabCaseProp; } - public static @java.lang.SuppressWarnings("all") JacksonJsonPropertyBuilder builder() { - return new JacksonJsonPropertyBuilder(); + public static @java.lang.SuppressWarnings("all") JacksonJsonProperty.JacksonJsonPropertyBuilder builder() { + return new JacksonJsonProperty.JacksonJsonPropertyBuilder(); } public @JsonProperty("kebab-case-prop") @JsonSetter(nulls = Nulls.SKIP) @java.lang.SuppressWarnings("all") void setKebabCaseProp(final String kebabCaseProp) { this.kebabCaseProp = kebabCaseProp; diff --git a/test/transform/resource/after-ecj/SuperBuilderAbstract.java b/test/transform/resource/after-ecj/SuperBuilderAbstract.java index 2839babd..51701668 100644 --- a/test/transform/resource/after-ecj/SuperBuilderAbstract.java +++ b/test/transform/resource/after-ecj/SuperBuilderAbstract.java @@ -1,6 +1,6 @@ public class SuperBuilderAbstract { public static @lombok.experimental.SuperBuilder class Parent { - public static abstract @java.lang.SuppressWarnings("all") class ParentBuilder> { + public static abstract @java.lang.SuppressWarnings("all") class ParentBuilder> { private @java.lang.SuppressWarnings("all") int parentField; public ParentBuilder() { super(); @@ -15,28 +15,28 @@ public class SuperBuilderAbstract { return (("SuperBuilderAbstract.Parent.ParentBuilder(parentField=" + this.parentField) + ")"); } } - private static final @java.lang.SuppressWarnings("all") class ParentBuilderImpl extends ParentBuilder { + private static final @java.lang.SuppressWarnings("all") class ParentBuilderImpl extends SuperBuilderAbstract.Parent.ParentBuilder { private ParentBuilderImpl() { super(); } - protected @java.lang.Override @java.lang.SuppressWarnings("all") ParentBuilderImpl self() { + protected @java.lang.Override @java.lang.SuppressWarnings("all") SuperBuilderAbstract.Parent.ParentBuilderImpl self() { return this; } - public @java.lang.Override @java.lang.SuppressWarnings("all") Parent build() { - return new Parent(this); + public @java.lang.Override @java.lang.SuppressWarnings("all") SuperBuilderAbstract.Parent build() { + return new SuperBuilderAbstract.Parent(this); } } int parentField; - protected @java.lang.SuppressWarnings("all") Parent(final ParentBuilder b) { + protected @java.lang.SuppressWarnings("all") Parent(final SuperBuilderAbstract.Parent.ParentBuilder b) { super(); this.parentField = b.parentField; } - public static @java.lang.SuppressWarnings("all") ParentBuilder builder() { - return new ParentBuilderImpl(); + public static @java.lang.SuppressWarnings("all") SuperBuilderAbstract.Parent.ParentBuilder builder() { + return new SuperBuilderAbstract.Parent.ParentBuilderImpl(); } } public static abstract @lombok.experimental.SuperBuilder class Child extends Parent { - public static abstract @java.lang.SuppressWarnings("all") class ChildBuilder> extends Parent.ParentBuilder { + public static abstract @java.lang.SuppressWarnings("all") class ChildBuilder> extends Parent.ParentBuilder { private @java.lang.SuppressWarnings("all") double childField; public ChildBuilder() { super(); @@ -52,13 +52,13 @@ public class SuperBuilderAbstract { } } double childField; - protected @java.lang.SuppressWarnings("all") Child(final ChildBuilder b) { + protected @java.lang.SuppressWarnings("all") Child(final SuperBuilderAbstract.Child.ChildBuilder b) { super(b); this.childField = b.childField; } } public static @lombok.experimental.SuperBuilder class GrandChild extends Child { - public static abstract @java.lang.SuppressWarnings("all") class GrandChildBuilder> extends Child.ChildBuilder { + public static abstract @java.lang.SuppressWarnings("all") class GrandChildBuilder> extends Child.ChildBuilder { private @java.lang.SuppressWarnings("all") String grandChildField; public GrandChildBuilder() { super(); @@ -73,24 +73,24 @@ public class SuperBuilderAbstract { return (((("SuperBuilderAbstract.GrandChild.GrandChildBuilder(super=" + super.toString()) + ", grandChildField=") + this.grandChildField) + ")"); } } - private static final @java.lang.SuppressWarnings("all") class GrandChildBuilderImpl extends GrandChildBuilder { + private static final @java.lang.SuppressWarnings("all") class GrandChildBuilderImpl extends SuperBuilderAbstract.GrandChild.GrandChildBuilder { private GrandChildBuilderImpl() { super(); } - protected @java.lang.Override @java.lang.SuppressWarnings("all") GrandChildBuilderImpl self() { + protected @java.lang.Override @java.lang.SuppressWarnings("all") SuperBuilderAbstract.GrandChild.GrandChildBuilderImpl self() { return this; } - public @java.lang.Override @java.lang.SuppressWarnings("all") GrandChild build() { - return new GrandChild(this); + public @java.lang.Override @java.lang.SuppressWarnings("all") SuperBuilderAbstract.GrandChild build() { + return new SuperBuilderAbstract.GrandChild(this); } } String grandChildField; - protected @java.lang.SuppressWarnings("all") GrandChild(final GrandChildBuilder b) { + protected @java.lang.SuppressWarnings("all") GrandChild(final SuperBuilderAbstract.GrandChild.GrandChildBuilder b) { super(b); this.grandChildField = b.grandChildField; } - public static @java.lang.SuppressWarnings("all") GrandChildBuilder builder() { - return new GrandChildBuilderImpl(); + public static @java.lang.SuppressWarnings("all") SuperBuilderAbstract.GrandChild.GrandChildBuilder builder() { + return new SuperBuilderAbstract.GrandChild.GrandChildBuilderImpl(); } } public SuperBuilderAbstract() { diff --git a/test/transform/resource/after-ecj/SuperBuilderAbstractToBuilder.java b/test/transform/resource/after-ecj/SuperBuilderAbstractToBuilder.java index 668f6acf..4fa722e5 100644 --- a/test/transform/resource/after-ecj/SuperBuilderAbstractToBuilder.java +++ b/test/transform/resource/after-ecj/SuperBuilderAbstractToBuilder.java @@ -1,15 +1,15 @@ public class SuperBuilderAbstractToBuilder { public static @lombok.experimental.SuperBuilder(toBuilder = true) class Parent { - public static abstract @java.lang.SuppressWarnings("all") class ParentBuilder> { + public static abstract @java.lang.SuppressWarnings("all") class ParentBuilder> { private @java.lang.SuppressWarnings("all") int parentField; public ParentBuilder() { super(); } protected @java.lang.SuppressWarnings("all") B $fillValuesFrom(final C instance) { - ParentBuilder.$fillValuesFromInstanceIntoBuilder(instance, this); + SuperBuilderAbstractToBuilder.Parent.ParentBuilder.$fillValuesFromInstanceIntoBuilder(instance, this); return self(); } - private static @java.lang.SuppressWarnings("all") void $fillValuesFromInstanceIntoBuilder(final Parent instance, final ParentBuilder b) { + private static @java.lang.SuppressWarnings("all") void $fillValuesFromInstanceIntoBuilder(final SuperBuilderAbstractToBuilder.Parent instance, final SuperBuilderAbstractToBuilder.Parent.ParentBuilder b) { b.parentField(instance.parentField); } protected abstract @java.lang.SuppressWarnings("all") B self(); @@ -22,41 +22,41 @@ public class SuperBuilderAbstractToBuilder { return (("SuperBuilderAbstractToBuilder.Parent.ParentBuilder(parentField=" + this.parentField) + ")"); } } - private static final @java.lang.SuppressWarnings("all") class ParentBuilderImpl extends ParentBuilder { + private static final @java.lang.SuppressWarnings("all") class ParentBuilderImpl extends SuperBuilderAbstractToBuilder.Parent.ParentBuilder { private ParentBuilderImpl() { super(); } - protected @java.lang.Override @java.lang.SuppressWarnings("all") ParentBuilderImpl self() { + protected @java.lang.Override @java.lang.SuppressWarnings("all") SuperBuilderAbstractToBuilder.Parent.ParentBuilderImpl self() { return this; } - public @java.lang.Override @java.lang.SuppressWarnings("all") Parent build() { - return new Parent(this); + public @java.lang.Override @java.lang.SuppressWarnings("all") SuperBuilderAbstractToBuilder.Parent build() { + return new SuperBuilderAbstractToBuilder.Parent(this); } } int parentField; - protected @java.lang.SuppressWarnings("all") Parent(final ParentBuilder b) { + protected @java.lang.SuppressWarnings("all") Parent(final SuperBuilderAbstractToBuilder.Parent.ParentBuilder b) { super(); this.parentField = b.parentField; } - public @java.lang.SuppressWarnings("all") ParentBuilder toBuilder() { - return new ParentBuilderImpl().$fillValuesFrom(this); + public @java.lang.SuppressWarnings("all") SuperBuilderAbstractToBuilder.Parent.ParentBuilder toBuilder() { + return new SuperBuilderAbstractToBuilder.Parent.ParentBuilderImpl().$fillValuesFrom(this); } - public static @java.lang.SuppressWarnings("all") ParentBuilder builder() { - return new ParentBuilderImpl(); + public static @java.lang.SuppressWarnings("all") SuperBuilderAbstractToBuilder.Parent.ParentBuilder builder() { + return new SuperBuilderAbstractToBuilder.Parent.ParentBuilderImpl(); } } public static abstract @lombok.experimental.SuperBuilder(toBuilder = true) class Child extends Parent { - public static abstract @java.lang.SuppressWarnings("all") class ChildBuilder> extends Parent.ParentBuilder { + public static abstract @java.lang.SuppressWarnings("all") class ChildBuilder> extends Parent.ParentBuilder { private @java.lang.SuppressWarnings("all") double childField; public ChildBuilder() { super(); } protected @java.lang.Override @java.lang.SuppressWarnings("all") B $fillValuesFrom(final C instance) { super.$fillValuesFrom(instance); - ChildBuilder.$fillValuesFromInstanceIntoBuilder(instance, this); + SuperBuilderAbstractToBuilder.Child.ChildBuilder.$fillValuesFromInstanceIntoBuilder(instance, this); return self(); } - private static @java.lang.SuppressWarnings("all") void $fillValuesFromInstanceIntoBuilder(final Child instance, final ChildBuilder b) { + private static @java.lang.SuppressWarnings("all") void $fillValuesFromInstanceIntoBuilder(final SuperBuilderAbstractToBuilder.Child instance, final SuperBuilderAbstractToBuilder.Child.ChildBuilder b) { b.childField(instance.childField); } protected abstract @java.lang.Override @java.lang.SuppressWarnings("all") B self(); @@ -70,23 +70,23 @@ public class SuperBuilderAbstractToBuilder { } } double childField; - protected @java.lang.SuppressWarnings("all") Child(final ChildBuilder b) { + protected @java.lang.SuppressWarnings("all") Child(final SuperBuilderAbstractToBuilder.Child.ChildBuilder b) { super(b); this.childField = b.childField; } } public static @lombok.experimental.SuperBuilder(toBuilder = true) class GrandChild extends Child { - public static abstract @java.lang.SuppressWarnings("all") class GrandChildBuilder> extends Child.ChildBuilder { + public static abstract @java.lang.SuppressWarnings("all") class GrandChildBuilder> extends Child.ChildBuilder { private @java.lang.SuppressWarnings("all") String grandChildField; public GrandChildBuilder() { super(); } protected @java.lang.Override @java.lang.SuppressWarnings("all") B $fillValuesFrom(final C instance) { super.$fillValuesFrom(instance); - GrandChildBuilder.$fillValuesFromInstanceIntoBuilder(instance, this); + SuperBuilderAbstractToBuilder.GrandChild.GrandChildBuilder.$fillValuesFromInstanceIntoBuilder(instance, this); return self(); } - private static @java.lang.SuppressWarnings("all") void $fillValuesFromInstanceIntoBuilder(final GrandChild instance, final GrandChildBuilder b) { + private static @java.lang.SuppressWarnings("all") void $fillValuesFromInstanceIntoBuilder(final SuperBuilderAbstractToBuilder.GrandChild instance, final SuperBuilderAbstractToBuilder.GrandChild.GrandChildBuilder b) { b.grandChildField(instance.grandChildField); } protected abstract @java.lang.Override @java.lang.SuppressWarnings("all") B self(); @@ -99,27 +99,27 @@ public class SuperBuilderAbstractToBuilder { return (((("SuperBuilderAbstractToBuilder.GrandChild.GrandChildBuilder(super=" + super.toString()) + ", grandChildField=") + this.grandChildField) + ")"); } } - private static final @java.lang.SuppressWarnings("all") class GrandChildBuilderImpl extends GrandChildBuilder { + private static final @java.lang.SuppressWarnings("all") class GrandChildBuilderImpl extends SuperBuilderAbstractToBuilder.GrandChild.GrandChildBuilder { private GrandChildBuilderImpl() { super(); } - protected @java.lang.Override @java.lang.SuppressWarnings("all") GrandChildBuilderImpl self() { + protected @java.lang.Override @java.lang.SuppressWarnings("all") SuperBuilderAbstractToBuilder.GrandChild.GrandChildBuilderImpl self() { return this; } - public @java.lang.Override @java.lang.SuppressWarnings("all") GrandChild build() { - return new GrandChild(this); + public @java.lang.Override @java.lang.SuppressWarnings("all") SuperBuilderAbstractToBuilder.GrandChild build() { + return new SuperBuilderAbstractToBuilder.GrandChild(this); } } String grandChildField; - protected @java.lang.SuppressWarnings("all") GrandChild(final GrandChildBuilder b) { + protected @java.lang.SuppressWarnings("all") GrandChild(final SuperBuilderAbstractToBuilder.GrandChild.GrandChildBuilder b) { super(b); this.grandChildField = b.grandChildField; } - public @java.lang.SuppressWarnings("all") GrandChildBuilder toBuilder() { - return new GrandChildBuilderImpl().$fillValuesFrom(this); + public @java.lang.SuppressWarnings("all") SuperBuilderAbstractToBuilder.GrandChild.GrandChildBuilder toBuilder() { + return new SuperBuilderAbstractToBuilder.GrandChild.GrandChildBuilderImpl().$fillValuesFrom(this); } - public static @java.lang.SuppressWarnings("all") GrandChildBuilder builder() { - return new GrandChildBuilderImpl(); + public static @java.lang.SuppressWarnings("all") SuperBuilderAbstractToBuilder.GrandChild.GrandChildBuilder builder() { + return new SuperBuilderAbstractToBuilder.GrandChild.GrandChildBuilderImpl(); } } public SuperBuilderAbstractToBuilder() { diff --git a/test/transform/resource/after-ecj/SuperBuilderBasic.java b/test/transform/resource/after-ecj/SuperBuilderBasic.java index 95cf5f01..dad0ad8f 100644 --- a/test/transform/resource/after-ecj/SuperBuilderBasic.java +++ b/test/transform/resource/after-ecj/SuperBuilderBasic.java @@ -1,7 +1,7 @@ import java.util.List; public class SuperBuilderBasic { public static @lombok.experimental.SuperBuilder class Parent { - public static abstract @java.lang.SuppressWarnings("all") class ParentBuilder> { + public static abstract @java.lang.SuppressWarnings("all") class ParentBuilder> { private @java.lang.SuppressWarnings("all") int field1; private @java.lang.SuppressWarnings("all") java.util.ArrayList items; public ParentBuilder() { @@ -34,20 +34,20 @@ public class SuperBuilderBasic { return (((("SuperBuilderBasic.Parent.ParentBuilder(field1=" + this.field1) + ", items=") + this.items) + ")"); } } - private static final @java.lang.SuppressWarnings("all") class ParentBuilderImpl extends ParentBuilder { + private static final @java.lang.SuppressWarnings("all") class ParentBuilderImpl extends SuperBuilderBasic.Parent.ParentBuilder { private ParentBuilderImpl() { super(); } - protected @java.lang.Override @java.lang.SuppressWarnings("all") ParentBuilderImpl self() { + protected @java.lang.Override @java.lang.SuppressWarnings("all") SuperBuilderBasic.Parent.ParentBuilderImpl self() { return this; } - public @java.lang.Override @java.lang.SuppressWarnings("all") Parent build() { - return new Parent(this); + public @java.lang.Override @java.lang.SuppressWarnings("all") SuperBuilderBasic.Parent build() { + return new SuperBuilderBasic.Parent(this); } } int field1; @lombok.Singular List items; - protected @java.lang.SuppressWarnings("all") Parent(final ParentBuilder b) { + protected @java.lang.SuppressWarnings("all") Parent(final SuperBuilderBasic.Parent.ParentBuilder b) { super(); this.field1 = b.field1; java.util.List items; @@ -63,12 +63,12 @@ public class SuperBuilderBasic { } this.items = items; } - public static @java.lang.SuppressWarnings("all") ParentBuilder builder() { - return new ParentBuilderImpl(); + public static @java.lang.SuppressWarnings("all") SuperBuilderBasic.Parent.ParentBuilder builder() { + return new SuperBuilderBasic.Parent.ParentBuilderImpl(); } } public static @lombok.experimental.SuperBuilder class Child extends Parent { - public static abstract @java.lang.SuppressWarnings("all") class ChildBuilder> extends Parent.ParentBuilder { + public static abstract @java.lang.SuppressWarnings("all") class ChildBuilder> extends Parent.ParentBuilder { private @java.lang.SuppressWarnings("all") double field3; public ChildBuilder() { super(); @@ -83,24 +83,24 @@ public class SuperBuilderBasic { return (((("SuperBuilderBasic.Child.ChildBuilder(super=" + super.toString()) + ", field3=") + this.field3) + ")"); } } - private static final @java.lang.SuppressWarnings("all") class ChildBuilderImpl extends ChildBuilder { + private static final @java.lang.SuppressWarnings("all") class ChildBuilderImpl extends SuperBuilderBasic.Child.ChildBuilder { private ChildBuilderImpl() { super(); } - protected @java.lang.Override @java.lang.SuppressWarnings("all") ChildBuilderImpl self() { + protected @java.lang.Override @java.lang.SuppressWarnings("all") SuperBuilderBasic.Child.ChildBuilderImpl self() { return this; } - public @java.lang.Override @java.lang.SuppressWarnings("all") Child build() { - return new Child(this); + public @java.lang.Override @java.lang.SuppressWarnings("all") SuperBuilderBasic.Child build() { + return new SuperBuilderBasic.Child(this); } } double field3; - protected @java.lang.SuppressWarnings("all") Child(final ChildBuilder b) { + protected @java.lang.SuppressWarnings("all") Child(final SuperBuilderBasic.Child.ChildBuilder b) { super(b); this.field3 = b.field3; } - public static @java.lang.SuppressWarnings("all") ChildBuilder builder() { - return new ChildBuilderImpl(); + public static @java.lang.SuppressWarnings("all") SuperBuilderBasic.Child.ChildBuilder builder() { + return new SuperBuilderBasic.Child.ChildBuilderImpl(); } } public SuperBuilderBasic() { diff --git a/test/transform/resource/after-ecj/SuperBuilderBasicToBuilder.java b/test/transform/resource/after-ecj/SuperBuilderBasicToBuilder.java index f4d99112..a9f111d0 100644 --- a/test/transform/resource/after-ecj/SuperBuilderBasicToBuilder.java +++ b/test/transform/resource/after-ecj/SuperBuilderBasicToBuilder.java @@ -1,7 +1,7 @@ import java.util.List; public class SuperBuilderBasicToBuilder { public static @lombok.experimental.SuperBuilder(toBuilder = true) class Parent { - public static abstract @java.lang.SuppressWarnings("all") class ParentBuilder> { + public static abstract @java.lang.SuppressWarnings("all") class ParentBuilder> { private @java.lang.SuppressWarnings("all") int field1; private @java.lang.SuppressWarnings("all") int obtainViaField; private @java.lang.SuppressWarnings("all") int obtainViaMethod; @@ -11,14 +11,14 @@ public class SuperBuilderBasicToBuilder { super(); } protected @java.lang.SuppressWarnings("all") B $fillValuesFrom(final C instance) { - ParentBuilder.$fillValuesFromInstanceIntoBuilder(instance, this); + SuperBuilderBasicToBuilder.Parent.ParentBuilder.$fillValuesFromInstanceIntoBuilder(instance, this); return self(); } - private static @java.lang.SuppressWarnings("all") void $fillValuesFromInstanceIntoBuilder(final Parent instance, final ParentBuilder b) { + private static @java.lang.SuppressWarnings("all") void $fillValuesFromInstanceIntoBuilder(final SuperBuilderBasicToBuilder.Parent instance, final SuperBuilderBasicToBuilder.Parent.ParentBuilder b) { b.field1(instance.field1); b.obtainViaField(instance.field1); b.obtainViaMethod(instance.method()); - b.obtainViaStaticMethod(Parent.staticMethod(instance)); + b.obtainViaStaticMethod(SuperBuilderBasicToBuilder.Parent.staticMethod(instance)); b.items(((instance.items == null) ? java.util.Collections.emptyList() : instance.items)); } protected abstract @java.lang.SuppressWarnings("all") B self(); @@ -60,15 +60,15 @@ public class SuperBuilderBasicToBuilder { return (((((((((("SuperBuilderBasicToBuilder.Parent.ParentBuilder(field1=" + this.field1) + ", obtainViaField=") + this.obtainViaField) + ", obtainViaMethod=") + this.obtainViaMethod) + ", obtainViaStaticMethod=") + this.obtainViaStaticMethod) + ", items=") + this.items) + ")"); } } - private static final @java.lang.SuppressWarnings("all") class ParentBuilderImpl extends ParentBuilder { + private static final @java.lang.SuppressWarnings("all") class ParentBuilderImpl extends SuperBuilderBasicToBuilder.Parent.ParentBuilder { private ParentBuilderImpl() { super(); } - protected @java.lang.Override @java.lang.SuppressWarnings("all") ParentBuilderImpl self() { + protected @java.lang.Override @java.lang.SuppressWarnings("all") SuperBuilderBasicToBuilder.Parent.ParentBuilderImpl self() { return this; } - public @java.lang.Override @java.lang.SuppressWarnings("all") Parent build() { - return new Parent(this); + public @java.lang.Override @java.lang.SuppressWarnings("all") SuperBuilderBasicToBuilder.Parent build() { + return new SuperBuilderBasicToBuilder.Parent(this); } } private int field1; @@ -82,7 +82,7 @@ public class SuperBuilderBasicToBuilder { private static String staticMethod(Parent instance) { return "staticMethod"; } - protected @java.lang.SuppressWarnings("all") Parent(final ParentBuilder b) { + protected @java.lang.SuppressWarnings("all") Parent(final SuperBuilderBasicToBuilder.Parent.ParentBuilder b) { super(); this.field1 = b.field1; this.obtainViaField = b.obtainViaField; @@ -101,25 +101,25 @@ public class SuperBuilderBasicToBuilder { } this.items = items; } - public @java.lang.SuppressWarnings("all") ParentBuilder toBuilder() { - return new ParentBuilderImpl().$fillValuesFrom(this); + public @java.lang.SuppressWarnings("all") SuperBuilderBasicToBuilder.Parent.ParentBuilder toBuilder() { + return new SuperBuilderBasicToBuilder.Parent.ParentBuilderImpl().$fillValuesFrom(this); } - public static @java.lang.SuppressWarnings("all") ParentBuilder builder() { - return new ParentBuilderImpl(); + public static @java.lang.SuppressWarnings("all") SuperBuilderBasicToBuilder.Parent.ParentBuilder builder() { + return new SuperBuilderBasicToBuilder.Parent.ParentBuilderImpl(); } } public static @lombok.experimental.SuperBuilder(toBuilder = true) class Child extends Parent { - public static abstract @java.lang.SuppressWarnings("all") class ChildBuilder> extends Parent.ParentBuilder { + public static abstract @java.lang.SuppressWarnings("all") class ChildBuilder> extends Parent.ParentBuilder { private @java.lang.SuppressWarnings("all") double field3; public ChildBuilder() { super(); } protected @java.lang.Override @java.lang.SuppressWarnings("all") B $fillValuesFrom(final C instance) { super.$fillValuesFrom(instance); - ChildBuilder.$fillValuesFromInstanceIntoBuilder(instance, this); + SuperBuilderBasicToBuilder.Child.ChildBuilder.$fillValuesFromInstanceIntoBuilder(instance, this); return self(); } - private static @java.lang.SuppressWarnings("all") void $fillValuesFromInstanceIntoBuilder(final Child instance, final ChildBuilder b) { + private static @java.lang.SuppressWarnings("all") void $fillValuesFromInstanceIntoBuilder(final SuperBuilderBasicToBuilder.Child instance, final SuperBuilderBasicToBuilder.Child.ChildBuilder b) { b.field3(instance.field3); } protected abstract @java.lang.Override @java.lang.SuppressWarnings("all") B self(); @@ -132,27 +132,27 @@ public class SuperBuilderBasicToBuilder { return (((("SuperBuilderBasicToBuilder.Child.ChildBuilder(super=" + super.toString()) + ", field3=") + this.field3) + ")"); } } - private static final @java.lang.SuppressWarnings("all") class ChildBuilderImpl extends ChildBuilder { + private static final @java.lang.SuppressWarnings("all") class ChildBuilderImpl extends SuperBuilderBasicToBuilder.Child.ChildBuilder { private ChildBuilderImpl() { super(); } - protected @java.lang.Override @java.lang.SuppressWarnings("all") ChildBuilderImpl self() { + protected @java.lang.Override @java.lang.SuppressWarnings("all") SuperBuilderBasicToBuilder.Child.ChildBuilderImpl self() { return this; } - public @java.lang.Override @java.lang.SuppressWarnings("all") Child build() { - return new Child(this); + public @java.lang.Override @java.lang.SuppressWarnings("all") SuperBuilderBasicToBuilder.Child build() { + return new SuperBuilderBasicToBuilder.Child(this); } } private double field3; - protected @java.lang.SuppressWarnings("all") Child(final ChildBuilder b) { + protected @java.lang.SuppressWarnings("all") Child(final SuperBuilderBasicToBuilder.Child.ChildBuilder b) { super(b); this.field3 = b.field3; } - public @java.lang.SuppressWarnings("all") ChildBuilder toBuilder() { - return new ChildBuilderImpl().$fillValuesFrom(this); + public @java.lang.SuppressWarnings("all") SuperBuilderBasicToBuilder.Child.ChildBuilder toBuilder() { + return new SuperBuilderBasicToBuilder.Child.ChildBuilderImpl().$fillValuesFrom(this); } - public static @java.lang.SuppressWarnings("all") ChildBuilder builder() { - return new ChildBuilderImpl(); + public static @java.lang.SuppressWarnings("all") SuperBuilderBasicToBuilder.Child.ChildBuilder builder() { + return new SuperBuilderBasicToBuilder.Child.ChildBuilderImpl(); } } public SuperBuilderBasicToBuilder() { diff --git a/test/transform/resource/after-ecj/SuperBuilderCustomized.java b/test/transform/resource/after-ecj/SuperBuilderCustomized.java index 7336a662..40d1f384 100644 --- a/test/transform/resource/after-ecj/SuperBuilderCustomized.java +++ b/test/transform/resource/after-ecj/SuperBuilderCustomized.java @@ -20,24 +20,24 @@ public class SuperBuilderCustomized { return (("SuperBuilderCustomized.Parent.ParentBuilder(field1=" + this.field1) + ")"); } } - private static final @java.lang.SuppressWarnings("all") class ParentBuilderImpl extends ParentBuilder { + private static final @java.lang.SuppressWarnings("all") class ParentBuilderImpl extends SuperBuilderCustomized.Parent.ParentBuilder { private ParentBuilderImpl() { super(); } - protected @java.lang.Override @java.lang.SuppressWarnings("all") ParentBuilderImpl self() { + protected @java.lang.Override @java.lang.SuppressWarnings("all") SuperBuilderCustomized.Parent.ParentBuilderImpl self() { return this; } - public @java.lang.Override @java.lang.SuppressWarnings("all") Parent build() { - return new Parent(this); + public @java.lang.Override @java.lang.SuppressWarnings("all") SuperBuilderCustomized.Parent build() { + return new SuperBuilderCustomized.Parent(this); } } int field1; - protected @java.lang.SuppressWarnings("all") Parent(final ParentBuilder b) { + protected @java.lang.SuppressWarnings("all") Parent(final SuperBuilderCustomized.Parent.ParentBuilder b) { super(); this.field1 = b.field1; } - public static @java.lang.SuppressWarnings("all") ParentBuilder builder() { - return new ParentBuilderImpl(); + public static @java.lang.SuppressWarnings("all") SuperBuilderCustomized.Parent.ParentBuilder builder() { + return new SuperBuilderCustomized.Parent.ParentBuilderImpl(); } } public static @lombok.experimental.SuperBuilder class Child extends Parent { @@ -49,11 +49,11 @@ public class SuperBuilderCustomized { this.resetToDefault(); return new Child(this); } - protected @java.lang.Override @java.lang.SuppressWarnings("all") ChildBuilderImpl self() { + protected @java.lang.Override @java.lang.SuppressWarnings("all") SuperBuilderCustomized.Child.ChildBuilderImpl self() { return this; } } - public static abstract @java.lang.SuppressWarnings("all") class ChildBuilder> extends Parent.ParentBuilder { + public static abstract @java.lang.SuppressWarnings("all") class ChildBuilder> extends Parent.ParentBuilder { private @java.lang.SuppressWarnings("all") double field2; public ChildBuilder() { super(); @@ -72,7 +72,7 @@ public class SuperBuilderCustomized { public static ChildBuilder builder() { return new ChildBuilderImpl().field2(10.0); } - protected @java.lang.SuppressWarnings("all") Child(final ChildBuilder b) { + protected @java.lang.SuppressWarnings("all") Child(final SuperBuilderCustomized.Child.ChildBuilder b) { super(b); this.field2 = b.field2; } diff --git a/test/transform/resource/after-ecj/SuperBuilderSingularAnnotatedTypes.java b/test/transform/resource/after-ecj/SuperBuilderSingularAnnotatedTypes.java index 9b89f2a8..809ca50c 100644 --- a/test/transform/resource/after-ecj/SuperBuilderSingularAnnotatedTypes.java +++ b/test/transform/resource/after-ecj/SuperBuilderSingularAnnotatedTypes.java @@ -7,7 +7,7 @@ import lombok.Singular; @Target(ElementType.TYPE_USE) @interface MyAnnotation { } @lombok.experimental.SuperBuilder class SuperBuilderSingularAnnotatedTypes { - public static abstract @java.lang.SuppressWarnings("all") class SuperBuilderSingularAnnotatedTypesBuilder> { + public static abstract @java.lang.SuppressWarnings("all") class SuperBuilderSingularAnnotatedTypesBuilder> { private @java.lang.SuppressWarnings("all") java.util.ArrayList<@MyAnnotation @NonNull String> foos; private @java.lang.SuppressWarnings("all") java.util.ArrayList<@MyAnnotation @NonNull String> bars$key; private @java.lang.SuppressWarnings("all") java.util.ArrayList<@MyAnnotation @NonNull Integer> bars$value; @@ -80,11 +80,11 @@ import lombok.Singular; return (((((("SuperBuilderSingularAnnotatedTypes.SuperBuilderSingularAnnotatedTypesBuilder(foos=" + this.foos) + ", bars$key=") + this.bars$key) + ", bars$value=") + this.bars$value) + ")"); } } - private static final @java.lang.SuppressWarnings("all") class SuperBuilderSingularAnnotatedTypesBuilderImpl extends SuperBuilderSingularAnnotatedTypesBuilder { + private static final @java.lang.SuppressWarnings("all") class SuperBuilderSingularAnnotatedTypesBuilderImpl extends SuperBuilderSingularAnnotatedTypes.SuperBuilderSingularAnnotatedTypesBuilder { private SuperBuilderSingularAnnotatedTypesBuilderImpl() { super(); } - protected @java.lang.Override @java.lang.SuppressWarnings("all") SuperBuilderSingularAnnotatedTypesBuilderImpl self() { + protected @java.lang.Override @java.lang.SuppressWarnings("all") SuperBuilderSingularAnnotatedTypes.SuperBuilderSingularAnnotatedTypesBuilderImpl self() { return this; } public @java.lang.Override @java.lang.SuppressWarnings("all") SuperBuilderSingularAnnotatedTypes build() { @@ -93,7 +93,7 @@ import lombok.Singular; } private @Singular Set<@MyAnnotation @NonNull String> foos; private @Singular Map<@MyAnnotation @NonNull String, @MyAnnotation @NonNull Integer> bars; - protected @java.lang.SuppressWarnings("all") SuperBuilderSingularAnnotatedTypes(final SuperBuilderSingularAnnotatedTypesBuilder b) { + protected @java.lang.SuppressWarnings("all") SuperBuilderSingularAnnotatedTypes(final SuperBuilderSingularAnnotatedTypes.SuperBuilderSingularAnnotatedTypesBuilder b) { super(); java.util.Set<@MyAnnotation @NonNull String> foos; switch (((b.foos == null) ? 0 : b.foos.size())) { @@ -125,7 +125,7 @@ import lombok.Singular; } this.bars = bars; } - public static @java.lang.SuppressWarnings("all") SuperBuilderSingularAnnotatedTypesBuilder builder() { - return new SuperBuilderSingularAnnotatedTypesBuilderImpl(); + public static @java.lang.SuppressWarnings("all") SuperBuilderSingularAnnotatedTypes.SuperBuilderSingularAnnotatedTypesBuilder builder() { + return new SuperBuilderSingularAnnotatedTypes.SuperBuilderSingularAnnotatedTypesBuilderImpl(); } } \ No newline at end of file diff --git a/test/transform/resource/after-ecj/SuperBuilderWithCustomBuilderMethod.java b/test/transform/resource/after-ecj/SuperBuilderWithCustomBuilderMethod.java index 0ec8921d..751e281b 100644 --- a/test/transform/resource/after-ecj/SuperBuilderWithCustomBuilderMethod.java +++ b/test/transform/resource/after-ecj/SuperBuilderWithCustomBuilderMethod.java @@ -1,7 +1,7 @@ import java.util.List; public class SuperBuilderWithCustomBuilderMethod { public static @lombok.experimental.SuperBuilder class Parent { - public static abstract @java.lang.SuppressWarnings("all") class ParentBuilder, B extends ParentBuilder> { + public static abstract @java.lang.SuppressWarnings("all") class ParentBuilder, B extends SuperBuilderWithCustomBuilderMethod.Parent.ParentBuilder> { private @java.lang.SuppressWarnings("all") A field1; private @java.lang.SuppressWarnings("all") java.util.ArrayList items; public ParentBuilder() { @@ -34,20 +34,20 @@ public class SuperBuilderWithCustomBuilderMethod { return (((("SuperBuilderWithCustomBuilderMethod.Parent.ParentBuilder(field1=" + this.field1) + ", items=") + this.items) + ")"); } } - private static final @java.lang.SuppressWarnings("all") class ParentBuilderImpl extends ParentBuilder, ParentBuilderImpl> { + private static final @java.lang.SuppressWarnings("all") class ParentBuilderImpl extends SuperBuilderWithCustomBuilderMethod.Parent.ParentBuilder, SuperBuilderWithCustomBuilderMethod.Parent.ParentBuilderImpl> { private ParentBuilderImpl() { super(); } - protected @java.lang.Override @java.lang.SuppressWarnings("all") ParentBuilderImpl self() { + protected @java.lang.Override @java.lang.SuppressWarnings("all") SuperBuilderWithCustomBuilderMethod.Parent.ParentBuilderImpl self() { return this; } - public @java.lang.Override @java.lang.SuppressWarnings("all") Parent build() { - return new Parent(this); + public @java.lang.Override @java.lang.SuppressWarnings("all") SuperBuilderWithCustomBuilderMethod.Parent build() { + return new SuperBuilderWithCustomBuilderMethod.Parent(this); } } A field1; @lombok.Singular List items; - protected @java.lang.SuppressWarnings("all") Parent(final ParentBuilder b) { + protected @java.lang.SuppressWarnings("all") Parent(final SuperBuilderWithCustomBuilderMethod.Parent.ParentBuilder b) { super(); this.field1 = b.field1; java.util.List items; @@ -63,12 +63,12 @@ public class SuperBuilderWithCustomBuilderMethod { } this.items = items; } - public static @java.lang.SuppressWarnings("all") ParentBuilder builder() { - return new ParentBuilderImpl(); + public static @java.lang.SuppressWarnings("all") SuperBuilderWithCustomBuilderMethod.Parent.ParentBuilder builder() { + return new SuperBuilderWithCustomBuilderMethod.Parent.ParentBuilderImpl(); } } public static @lombok.experimental.SuperBuilder class Child extends Parent { - public static abstract @java.lang.SuppressWarnings("all") class ChildBuilder, B extends ChildBuilder> extends Parent.ParentBuilder { + public static abstract @java.lang.SuppressWarnings("all") class ChildBuilder, B extends SuperBuilderWithCustomBuilderMethod.Child.ChildBuilder> extends Parent.ParentBuilder { private @java.lang.SuppressWarnings("all") double field3; public ChildBuilder() { super(); @@ -83,22 +83,22 @@ public class SuperBuilderWithCustomBuilderMethod { return (((("SuperBuilderWithCustomBuilderMethod.Child.ChildBuilder(super=" + super.toString()) + ", field3=") + this.field3) + ")"); } } - private static final @java.lang.SuppressWarnings("all") class ChildBuilderImpl extends ChildBuilder, ChildBuilderImpl> { + private static final @java.lang.SuppressWarnings("all") class ChildBuilderImpl extends SuperBuilderWithCustomBuilderMethod.Child.ChildBuilder, SuperBuilderWithCustomBuilderMethod.Child.ChildBuilderImpl> { private ChildBuilderImpl() { super(); } - protected @java.lang.Override @java.lang.SuppressWarnings("all") ChildBuilderImpl self() { + protected @java.lang.Override @java.lang.SuppressWarnings("all") SuperBuilderWithCustomBuilderMethod.Child.ChildBuilderImpl self() { return this; } - public @java.lang.Override @java.lang.SuppressWarnings("all") Child build() { - return new Child(this); + public @java.lang.Override @java.lang.SuppressWarnings("all") SuperBuilderWithCustomBuilderMethod.Child build() { + return new SuperBuilderWithCustomBuilderMethod.Child(this); } } double field3; public static ChildBuilder builder() { return new ChildBuilderImpl().item("default item"); } - protected @java.lang.SuppressWarnings("all") Child(final ChildBuilder b) { + protected @java.lang.SuppressWarnings("all") Child(final SuperBuilderWithCustomBuilderMethod.Child.ChildBuilder b) { super(b); this.field3 = b.field3; } diff --git a/test/transform/resource/after-ecj/SuperBuilderWithDefaults.java b/test/transform/resource/after-ecj/SuperBuilderWithDefaults.java index ff1b5931..03bfd319 100644 --- a/test/transform/resource/after-ecj/SuperBuilderWithDefaults.java +++ b/test/transform/resource/after-ecj/SuperBuilderWithDefaults.java @@ -1,7 +1,7 @@ import java.util.List; public class SuperBuilderWithDefaults { public static @lombok.experimental.SuperBuilder class Parent { - public static abstract @java.lang.SuppressWarnings("all") class ParentBuilder, B extends ParentBuilder> { + public static abstract @java.lang.SuppressWarnings("all") class ParentBuilder, B extends SuperBuilderWithDefaults.Parent.ParentBuilder> { private @java.lang.SuppressWarnings("all") long millis$value; private @java.lang.SuppressWarnings("all") boolean millis$set; private @java.lang.SuppressWarnings("all") N numberField$value; @@ -25,15 +25,15 @@ public class SuperBuilderWithDefaults { return (((("SuperBuilderWithDefaults.Parent.ParentBuilder(millis$value=" + this.millis$value) + ", numberField$value=") + this.numberField$value) + ")"); } } - private static final @java.lang.SuppressWarnings("all") class ParentBuilderImpl extends ParentBuilder, ParentBuilderImpl> { + private static final @java.lang.SuppressWarnings("all") class ParentBuilderImpl extends SuperBuilderWithDefaults.Parent.ParentBuilder, SuperBuilderWithDefaults.Parent.ParentBuilderImpl> { private ParentBuilderImpl() { super(); } - protected @java.lang.Override @java.lang.SuppressWarnings("all") ParentBuilderImpl self() { + protected @java.lang.Override @java.lang.SuppressWarnings("all") SuperBuilderWithDefaults.Parent.ParentBuilderImpl self() { return this; } - public @java.lang.Override @java.lang.SuppressWarnings("all") Parent build() { - return new Parent(this); + public @java.lang.Override @java.lang.SuppressWarnings("all") SuperBuilderWithDefaults.Parent build() { + return new SuperBuilderWithDefaults.Parent(this); } } private @lombok.Builder.Default long millis; @@ -44,23 +44,23 @@ public class SuperBuilderWithDefaults { private static @java.lang.SuppressWarnings("all") N $default$numberField() { return null; } - protected @java.lang.SuppressWarnings("all") Parent(final ParentBuilder b) { + protected @java.lang.SuppressWarnings("all") Parent(final SuperBuilderWithDefaults.Parent.ParentBuilder b) { super(); if (b.millis$set) this.millis = b.millis$value; else - this.millis = Parent.$default$millis(); + this.millis = SuperBuilderWithDefaults.Parent.$default$millis(); if (b.numberField$set) this.numberField = b.numberField$value; else - this.numberField = Parent.$default$numberField(); + this.numberField = SuperBuilderWithDefaults.Parent.$default$numberField(); } - public static @java.lang.SuppressWarnings("all") ParentBuilder builder() { - return new ParentBuilderImpl(); + public static @java.lang.SuppressWarnings("all") SuperBuilderWithDefaults.Parent.ParentBuilder builder() { + return new SuperBuilderWithDefaults.Parent.ParentBuilderImpl(); } } public static @lombok.experimental.SuperBuilder class Child extends Parent { - public static abstract @java.lang.SuppressWarnings("all") class ChildBuilder> extends Parent.ParentBuilder { + public static abstract @java.lang.SuppressWarnings("all") class ChildBuilder> extends Parent.ParentBuilder { private @java.lang.SuppressWarnings("all") double doubleField$value; private @java.lang.SuppressWarnings("all") boolean doubleField$set; public ChildBuilder() { @@ -77,30 +77,30 @@ public class SuperBuilderWithDefaults { return (((("SuperBuilderWithDefaults.Child.ChildBuilder(super=" + super.toString()) + ", doubleField$value=") + this.doubleField$value) + ")"); } } - private static final @java.lang.SuppressWarnings("all") class ChildBuilderImpl extends ChildBuilder { + private static final @java.lang.SuppressWarnings("all") class ChildBuilderImpl extends SuperBuilderWithDefaults.Child.ChildBuilder { private ChildBuilderImpl() { super(); } - protected @java.lang.Override @java.lang.SuppressWarnings("all") ChildBuilderImpl self() { + protected @java.lang.Override @java.lang.SuppressWarnings("all") SuperBuilderWithDefaults.Child.ChildBuilderImpl self() { return this; } - public @java.lang.Override @java.lang.SuppressWarnings("all") Child build() { - return new Child(this); + public @java.lang.Override @java.lang.SuppressWarnings("all") SuperBuilderWithDefaults.Child build() { + return new SuperBuilderWithDefaults.Child(this); } } private @lombok.Builder.Default double doubleField; private static @java.lang.SuppressWarnings("all") double $default$doubleField() { return Math.PI; } - protected @java.lang.SuppressWarnings("all") Child(final ChildBuilder b) { + protected @java.lang.SuppressWarnings("all") Child(final SuperBuilderWithDefaults.Child.ChildBuilder b) { super(b); if (b.doubleField$set) this.doubleField = b.doubleField$value; else - this.doubleField = Child.$default$doubleField(); + this.doubleField = SuperBuilderWithDefaults.Child.$default$doubleField(); } - public static @java.lang.SuppressWarnings("all") ChildBuilder builder() { - return new ChildBuilderImpl(); + public static @java.lang.SuppressWarnings("all") SuperBuilderWithDefaults.Child.ChildBuilder builder() { + return new SuperBuilderWithDefaults.Child.ChildBuilderImpl(); } } public SuperBuilderWithDefaults() { diff --git a/test/transform/resource/after-ecj/SuperBuilderWithGenerics.java b/test/transform/resource/after-ecj/SuperBuilderWithGenerics.java index 465704bb..bbf07d75 100644 --- a/test/transform/resource/after-ecj/SuperBuilderWithGenerics.java +++ b/test/transform/resource/after-ecj/SuperBuilderWithGenerics.java @@ -1,7 +1,7 @@ import java.util.List; public class SuperBuilderWithGenerics { public static @lombok.experimental.SuperBuilder class Parent { - public static abstract @java.lang.SuppressWarnings("all") class ParentBuilder, B extends ParentBuilder> { + public static abstract @java.lang.SuppressWarnings("all") class ParentBuilder, B extends SuperBuilderWithGenerics.Parent.ParentBuilder> { private @java.lang.SuppressWarnings("all") A field1; private @java.lang.SuppressWarnings("all") java.util.ArrayList items; public ParentBuilder() { @@ -34,20 +34,20 @@ public class SuperBuilderWithGenerics { return (((("SuperBuilderWithGenerics.Parent.ParentBuilder(field1=" + this.field1) + ", items=") + this.items) + ")"); } } - private static final @java.lang.SuppressWarnings("all") class ParentBuilderImpl extends ParentBuilder, ParentBuilderImpl> { + private static final @java.lang.SuppressWarnings("all") class ParentBuilderImpl extends SuperBuilderWithGenerics.Parent.ParentBuilder, SuperBuilderWithGenerics.Parent.ParentBuilderImpl> { private ParentBuilderImpl() { super(); } - protected @java.lang.Override @java.lang.SuppressWarnings("all") ParentBuilderImpl self() { + protected @java.lang.Override @java.lang.SuppressWarnings("all") SuperBuilderWithGenerics.Parent.ParentBuilderImpl self() { return this; } - public @java.lang.Override @java.lang.SuppressWarnings("all") Parent build() { - return new Parent(this); + public @java.lang.Override @java.lang.SuppressWarnings("all") SuperBuilderWithGenerics.Parent build() { + return new SuperBuilderWithGenerics.Parent(this); } } A field1; @lombok.Singular List items; - protected @java.lang.SuppressWarnings("all") Parent(final ParentBuilder b) { + protected @java.lang.SuppressWarnings("all") Parent(final SuperBuilderWithGenerics.Parent.ParentBuilder b) { super(); this.field1 = b.field1; java.util.List items; @@ -63,12 +63,12 @@ public class SuperBuilderWithGenerics { } this.items = items; } - public static @java.lang.SuppressWarnings("all") ParentBuilder builder() { - return new ParentBuilderImpl(); + public static @java.lang.SuppressWarnings("all") SuperBuilderWithGenerics.Parent.ParentBuilder builder() { + return new SuperBuilderWithGenerics.Parent.ParentBuilderImpl(); } } public static @lombok.experimental.SuperBuilder class Child extends Parent { - public static abstract @java.lang.SuppressWarnings("all") class ChildBuilder, B extends ChildBuilder> extends Parent.ParentBuilder { + public static abstract @java.lang.SuppressWarnings("all") class ChildBuilder, B extends SuperBuilderWithGenerics.Child.ChildBuilder> extends Parent.ParentBuilder { private @java.lang.SuppressWarnings("all") double field3; public ChildBuilder() { super(); @@ -83,24 +83,24 @@ public class SuperBuilderWithGenerics { return (((("SuperBuilderWithGenerics.Child.ChildBuilder(super=" + super.toString()) + ", field3=") + this.field3) + ")"); } } - private static final @java.lang.SuppressWarnings("all") class ChildBuilderImpl extends ChildBuilder, ChildBuilderImpl> { + private static final @java.lang.SuppressWarnings("all") class ChildBuilderImpl extends SuperBuilderWithGenerics.Child.ChildBuilder, SuperBuilderWithGenerics.Child.ChildBuilderImpl> { private ChildBuilderImpl() { super(); } - protected @java.lang.Override @java.lang.SuppressWarnings("all") ChildBuilderImpl self() { + protected @java.lang.Override @java.lang.SuppressWarnings("all") SuperBuilderWithGenerics.Child.ChildBuilderImpl self() { return this; } - public @java.lang.Override @java.lang.SuppressWarnings("all") Child build() { - return new Child(this); + public @java.lang.Override @java.lang.SuppressWarnings("all") SuperBuilderWithGenerics.Child build() { + return new SuperBuilderWithGenerics.Child(this); } } double field3; - protected @java.lang.SuppressWarnings("all") Child(final ChildBuilder b) { + protected @java.lang.SuppressWarnings("all") Child(final SuperBuilderWithGenerics.Child.ChildBuilder b) { super(b); this.field3 = b.field3; } - public static @java.lang.SuppressWarnings("all") ChildBuilder builder() { - return new ChildBuilderImpl(); + public static @java.lang.SuppressWarnings("all") SuperBuilderWithGenerics.Child.ChildBuilder builder() { + return new SuperBuilderWithGenerics.Child.ChildBuilderImpl(); } } public SuperBuilderWithGenerics() { diff --git a/test/transform/resource/after-ecj/SuperBuilderWithGenerics2.java b/test/transform/resource/after-ecj/SuperBuilderWithGenerics2.java index 8429ee35..b3ca18ec 100644 --- a/test/transform/resource/after-ecj/SuperBuilderWithGenerics2.java +++ b/test/transform/resource/after-ecj/SuperBuilderWithGenerics2.java @@ -1,7 +1,7 @@ import java.util.List; public class SuperBuilderWithGenerics2 { public static @lombok.experimental.SuperBuilder class Parent { - public static abstract @java.lang.SuppressWarnings("all") class ParentBuilder, B extends ParentBuilder> { + public static abstract @java.lang.SuppressWarnings("all") class ParentBuilder, B extends SuperBuilderWithGenerics2.Parent.ParentBuilder> { private @java.lang.SuppressWarnings("all") A field1; private @java.lang.SuppressWarnings("all") java.util.ArrayList items; public ParentBuilder() { @@ -34,20 +34,20 @@ public class SuperBuilderWithGenerics2 { return (((("SuperBuilderWithGenerics2.Parent.ParentBuilder(field1=" + this.field1) + ", items=") + this.items) + ")"); } } - private static final @java.lang.SuppressWarnings("all") class ParentBuilderImpl extends ParentBuilder, ParentBuilderImpl> { + private static final @java.lang.SuppressWarnings("all") class ParentBuilderImpl extends SuperBuilderWithGenerics2.Parent.ParentBuilder, SuperBuilderWithGenerics2.Parent.ParentBuilderImpl> { private ParentBuilderImpl() { super(); } - protected @java.lang.Override @java.lang.SuppressWarnings("all") ParentBuilderImpl self() { + protected @java.lang.Override @java.lang.SuppressWarnings("all") SuperBuilderWithGenerics2.Parent.ParentBuilderImpl self() { return this; } - public @java.lang.Override @java.lang.SuppressWarnings("all") Parent build() { - return new Parent(this); + public @java.lang.Override @java.lang.SuppressWarnings("all") SuperBuilderWithGenerics2.Parent build() { + return new SuperBuilderWithGenerics2.Parent(this); } } A field1; @lombok.Singular List items; - protected @java.lang.SuppressWarnings("all") Parent(final ParentBuilder b) { + protected @java.lang.SuppressWarnings("all") Parent(final SuperBuilderWithGenerics2.Parent.ParentBuilder b) { super(); this.field1 = b.field1; java.util.List items; @@ -63,12 +63,12 @@ public class SuperBuilderWithGenerics2 { } this.items = items; } - public static @java.lang.SuppressWarnings("all") ParentBuilder builder() { - return new ParentBuilderImpl(); + public static @java.lang.SuppressWarnings("all") SuperBuilderWithGenerics2.Parent.ParentBuilder builder() { + return new SuperBuilderWithGenerics2.Parent.ParentBuilderImpl(); } } public static @lombok.experimental.SuperBuilder(builderMethodName = "builder2") class Child extends Parent { - public static abstract @java.lang.SuppressWarnings("all") class ChildBuilder, B extends ChildBuilder> extends Parent.ParentBuilder { + public static abstract @java.lang.SuppressWarnings("all") class ChildBuilder, B extends SuperBuilderWithGenerics2.Child.ChildBuilder> extends Parent.ParentBuilder { private @java.lang.SuppressWarnings("all") A field3; public ChildBuilder() { super(); @@ -83,24 +83,24 @@ public class SuperBuilderWithGenerics2 { return (((("SuperBuilderWithGenerics2.Child.ChildBuilder(super=" + super.toString()) + ", field3=") + this.field3) + ")"); } } - private static final @java.lang.SuppressWarnings("all") class ChildBuilderImpl extends ChildBuilder, ChildBuilderImpl> { + private static final @java.lang.SuppressWarnings("all") class ChildBuilderImpl extends SuperBuilderWithGenerics2.Child.ChildBuilder, SuperBuilderWithGenerics2.Child.ChildBuilderImpl> { private ChildBuilderImpl() { super(); } - protected @java.lang.Override @java.lang.SuppressWarnings("all") ChildBuilderImpl self() { + protected @java.lang.Override @java.lang.SuppressWarnings("all") SuperBuilderWithGenerics2.Child.ChildBuilderImpl self() { return this; } - public @java.lang.Override @java.lang.SuppressWarnings("all") Child build() { - return new Child(this); + public @java.lang.Override @java.lang.SuppressWarnings("all") SuperBuilderWithGenerics2.Child build() { + return new SuperBuilderWithGenerics2.Child(this); } } A field3; - protected @java.lang.SuppressWarnings("all") Child(final ChildBuilder b) { + protected @java.lang.SuppressWarnings("all") Child(final SuperBuilderWithGenerics2.Child.ChildBuilder b) { super(b); this.field3 = b.field3; } - public static @java.lang.SuppressWarnings("all") ChildBuilder builder2() { - return new ChildBuilderImpl(); + public static @java.lang.SuppressWarnings("all") SuperBuilderWithGenerics2.Child.ChildBuilder builder2() { + return new SuperBuilderWithGenerics2.Child.ChildBuilderImpl(); } } public SuperBuilderWithGenerics2() { diff --git a/test/transform/resource/after-ecj/SuperBuilderWithGenerics3.java b/test/transform/resource/after-ecj/SuperBuilderWithGenerics3.java index 22b55848..760c4439 100644 --- a/test/transform/resource/after-ecj/SuperBuilderWithGenerics3.java +++ b/test/transform/resource/after-ecj/SuperBuilderWithGenerics3.java @@ -1,7 +1,7 @@ import java.util.List; public class SuperBuilderWithGenerics3 { public static @lombok.experimental.SuperBuilder class Parent { - public static abstract @java.lang.SuppressWarnings("all") class ParentBuilder, B extends ParentBuilder> { + public static abstract @java.lang.SuppressWarnings("all") class ParentBuilder, B extends SuperBuilderWithGenerics3.Parent.ParentBuilder> { private @java.lang.SuppressWarnings("all") String str; public ParentBuilder() { super(); @@ -16,24 +16,24 @@ public class SuperBuilderWithGenerics3 { return (("SuperBuilderWithGenerics3.Parent.ParentBuilder(str=" + this.str) + ")"); } } - private static final @java.lang.SuppressWarnings("all") class ParentBuilderImpl extends ParentBuilder, ParentBuilderImpl> { + private static final @java.lang.SuppressWarnings("all") class ParentBuilderImpl extends SuperBuilderWithGenerics3.Parent.ParentBuilder, SuperBuilderWithGenerics3.Parent.ParentBuilderImpl> { private ParentBuilderImpl() { super(); } - protected @java.lang.Override @java.lang.SuppressWarnings("all") ParentBuilderImpl self() { + protected @java.lang.Override @java.lang.SuppressWarnings("all") SuperBuilderWithGenerics3.Parent.ParentBuilderImpl self() { return this; } - public @java.lang.Override @java.lang.SuppressWarnings("all") Parent build() { - return new Parent(this); + public @java.lang.Override @java.lang.SuppressWarnings("all") SuperBuilderWithGenerics3.Parent build() { + return new SuperBuilderWithGenerics3.Parent(this); } } private final String str; - protected @java.lang.SuppressWarnings("all") Parent(final ParentBuilder b) { + protected @java.lang.SuppressWarnings("all") Parent(final SuperBuilderWithGenerics3.Parent.ParentBuilder b) { super(); this.str = b.str; } - public static @java.lang.SuppressWarnings("all") ParentBuilder builder() { - return new ParentBuilderImpl(); + public static @java.lang.SuppressWarnings("all") SuperBuilderWithGenerics3.Parent.ParentBuilder builder() { + return new SuperBuilderWithGenerics3.Parent.ParentBuilderImpl(); } } public static @lombok.experimental.SuperBuilder class Child extends Parent { @@ -42,7 +42,7 @@ public class SuperBuilderWithGenerics3 { super(); } } - public static abstract @java.lang.SuppressWarnings("all") class ChildBuilder> extends Parent.ParentBuilder { + public static abstract @java.lang.SuppressWarnings("all") class ChildBuilder> extends Parent.ParentBuilder { private @java.lang.SuppressWarnings("all") double field3; public ChildBuilder() { super(); @@ -57,24 +57,24 @@ public class SuperBuilderWithGenerics3 { return (((("SuperBuilderWithGenerics3.Child.ChildBuilder(super=" + super.toString()) + ", field3=") + this.field3) + ")"); } } - private static final @java.lang.SuppressWarnings("all") class ChildBuilderImpl extends ChildBuilder { + private static final @java.lang.SuppressWarnings("all") class ChildBuilderImpl extends SuperBuilderWithGenerics3.Child.ChildBuilder { private ChildBuilderImpl() { super(); } - protected @java.lang.Override @java.lang.SuppressWarnings("all") ChildBuilderImpl self() { + protected @java.lang.Override @java.lang.SuppressWarnings("all") SuperBuilderWithGenerics3.Child.ChildBuilderImpl self() { return this; } - public @java.lang.Override @java.lang.SuppressWarnings("all") Child build() { - return new Child(this); + public @java.lang.Override @java.lang.SuppressWarnings("all") SuperBuilderWithGenerics3.Child build() { + return new SuperBuilderWithGenerics3.Child(this); } } double field3; - protected @java.lang.SuppressWarnings("all") Child(final ChildBuilder b) { + protected @java.lang.SuppressWarnings("all") Child(final SuperBuilderWithGenerics3.Child.ChildBuilder b) { super(b); this.field3 = b.field3; } - public static @java.lang.SuppressWarnings("all") ChildBuilder builder() { - return new ChildBuilderImpl(); + public static @java.lang.SuppressWarnings("all") SuperBuilderWithGenerics3.Child.ChildBuilder builder() { + return new SuperBuilderWithGenerics3.Child.ChildBuilderImpl(); } } public SuperBuilderWithGenerics3() { diff --git a/test/transform/resource/after-ecj/SuperBuilderWithGenericsAndToBuilder.java b/test/transform/resource/after-ecj/SuperBuilderWithGenericsAndToBuilder.java index ce960d61..457104ef 100644 --- a/test/transform/resource/after-ecj/SuperBuilderWithGenericsAndToBuilder.java +++ b/test/transform/resource/after-ecj/SuperBuilderWithGenericsAndToBuilder.java @@ -1,7 +1,7 @@ import java.util.Map; public class SuperBuilderWithGenericsAndToBuilder { public static @lombok.experimental.SuperBuilder(toBuilder = true) class Parent { - public static abstract @java.lang.SuppressWarnings("all") class ParentBuilder, B extends ParentBuilder> { + public static abstract @java.lang.SuppressWarnings("all") class ParentBuilder, B extends SuperBuilderWithGenericsAndToBuilder.Parent.ParentBuilder> { private @java.lang.SuppressWarnings("all") A field1; private @java.lang.SuppressWarnings("all") java.util.ArrayList items$key; private @java.lang.SuppressWarnings("all") java.util.ArrayList items$value; @@ -9,10 +9,10 @@ public class SuperBuilderWithGenericsAndToBuilder { super(); } protected @java.lang.SuppressWarnings("all") B $fillValuesFrom(final C instance) { - ParentBuilder.$fillValuesFromInstanceIntoBuilder(instance, this); + SuperBuilderWithGenericsAndToBuilder.Parent.ParentBuilder.$fillValuesFromInstanceIntoBuilder(instance, this); return self(); } - private static @java.lang.SuppressWarnings("all") void $fillValuesFromInstanceIntoBuilder(final Parent instance, final ParentBuilder b) { + private static @java.lang.SuppressWarnings("all") void $fillValuesFromInstanceIntoBuilder(final SuperBuilderWithGenericsAndToBuilder.Parent instance, final SuperBuilderWithGenericsAndToBuilder.Parent.ParentBuilder b) { b.field1(instance.field1); b.items(((instance.items == null) ? java.util.Collections.emptyMap() : instance.items)); } @@ -57,20 +57,20 @@ public class SuperBuilderWithGenericsAndToBuilder { return (((((("SuperBuilderWithGenericsAndToBuilder.Parent.ParentBuilder(field1=" + this.field1) + ", items$key=") + this.items$key) + ", items$value=") + this.items$value) + ")"); } } - private static final @java.lang.SuppressWarnings("all") class ParentBuilderImpl extends ParentBuilder, ParentBuilderImpl> { + private static final @java.lang.SuppressWarnings("all") class ParentBuilderImpl extends SuperBuilderWithGenericsAndToBuilder.Parent.ParentBuilder, SuperBuilderWithGenericsAndToBuilder.Parent.ParentBuilderImpl> { private ParentBuilderImpl() { super(); } - protected @java.lang.Override @java.lang.SuppressWarnings("all") ParentBuilderImpl self() { + protected @java.lang.Override @java.lang.SuppressWarnings("all") SuperBuilderWithGenericsAndToBuilder.Parent.ParentBuilderImpl self() { return this; } - public @java.lang.Override @java.lang.SuppressWarnings("all") Parent build() { - return new Parent(this); + public @java.lang.Override @java.lang.SuppressWarnings("all") SuperBuilderWithGenericsAndToBuilder.Parent build() { + return new SuperBuilderWithGenericsAndToBuilder.Parent(this); } } A field1; @lombok.Singular Map items; - protected @java.lang.SuppressWarnings("all") Parent(final ParentBuilder b) { + protected @java.lang.SuppressWarnings("all") Parent(final SuperBuilderWithGenericsAndToBuilder.Parent.ParentBuilder b) { super(); this.field1 = b.field1; java.util.Map items; @@ -89,25 +89,25 @@ public class SuperBuilderWithGenericsAndToBuilder { } this.items = items; } - public @java.lang.SuppressWarnings("all") ParentBuilder toBuilder() { - return new ParentBuilderImpl().$fillValuesFrom(this); + public @java.lang.SuppressWarnings("all") SuperBuilderWithGenericsAndToBuilder.Parent.ParentBuilder toBuilder() { + return new SuperBuilderWithGenericsAndToBuilder.Parent.ParentBuilderImpl().$fillValuesFrom(this); } - public static @java.lang.SuppressWarnings("all") ParentBuilder builder() { - return new ParentBuilderImpl(); + public static @java.lang.SuppressWarnings("all") SuperBuilderWithGenericsAndToBuilder.Parent.ParentBuilder builder() { + return new SuperBuilderWithGenericsAndToBuilder.Parent.ParentBuilderImpl(); } } public static @lombok.experimental.SuperBuilder(toBuilder = true) class Child extends Parent { - public static abstract @java.lang.SuppressWarnings("all") class ChildBuilder, B extends ChildBuilder> extends Parent.ParentBuilder { + public static abstract @java.lang.SuppressWarnings("all") class ChildBuilder, B extends SuperBuilderWithGenericsAndToBuilder.Child.ChildBuilder> extends Parent.ParentBuilder { private @java.lang.SuppressWarnings("all") double field3; public ChildBuilder() { super(); } protected @java.lang.Override @java.lang.SuppressWarnings("all") B $fillValuesFrom(final C instance) { super.$fillValuesFrom(instance); - ChildBuilder.$fillValuesFromInstanceIntoBuilder(instance, this); + SuperBuilderWithGenericsAndToBuilder.Child.ChildBuilder.$fillValuesFromInstanceIntoBuilder(instance, this); return self(); } - private static @java.lang.SuppressWarnings("all") void $fillValuesFromInstanceIntoBuilder(final Child instance, final ChildBuilder b) { + private static @java.lang.SuppressWarnings("all") void $fillValuesFromInstanceIntoBuilder(final SuperBuilderWithGenericsAndToBuilder.Child instance, final SuperBuilderWithGenericsAndToBuilder.Child.ChildBuilder b) { b.field3(instance.field3); } protected abstract @java.lang.Override @java.lang.SuppressWarnings("all") B self(); @@ -120,27 +120,27 @@ public class SuperBuilderWithGenericsAndToBuilder { return (((("SuperBuilderWithGenericsAndToBuilder.Child.ChildBuilder(super=" + super.toString()) + ", field3=") + this.field3) + ")"); } } - private static final @java.lang.SuppressWarnings("all") class ChildBuilderImpl extends ChildBuilder, ChildBuilderImpl> { + private static final @java.lang.SuppressWarnings("all") class ChildBuilderImpl extends SuperBuilderWithGenericsAndToBuilder.Child.ChildBuilder, SuperBuilderWithGenericsAndToBuilder.Child.ChildBuilderImpl> { private ChildBuilderImpl() { super(); } - protected @java.lang.Override @java.lang.SuppressWarnings("all") ChildBuilderImpl self() { + protected @java.lang.Override @java.lang.SuppressWarnings("all") SuperBuilderWithGenericsAndToBuilder.Child.ChildBuilderImpl self() { return this; } - public @java.lang.Override @java.lang.SuppressWarnings("all") Child build() { - return new Child(this); + public @java.lang.Override @java.lang.SuppressWarnings("all") SuperBuilderWithGenericsAndToBuilder.Child build() { + return new SuperBuilderWithGenericsAndToBuilder.Child(this); } } double field3; - protected @java.lang.SuppressWarnings("all") Child(final ChildBuilder b) { + protected @java.lang.SuppressWarnings("all") Child(final SuperBuilderWithGenericsAndToBuilder.Child.ChildBuilder b) { super(b); this.field3 = b.field3; } - public @java.lang.SuppressWarnings("all") ChildBuilder toBuilder() { - return new ChildBuilderImpl().$fillValuesFrom(this); + public @java.lang.SuppressWarnings("all") SuperBuilderWithGenericsAndToBuilder.Child.ChildBuilder toBuilder() { + return new SuperBuilderWithGenericsAndToBuilder.Child.ChildBuilderImpl().$fillValuesFrom(this); } - public static @java.lang.SuppressWarnings("all") ChildBuilder builder() { - return new ChildBuilderImpl(); + public static @java.lang.SuppressWarnings("all") SuperBuilderWithGenericsAndToBuilder.Child.ChildBuilder builder() { + return new SuperBuilderWithGenericsAndToBuilder.Child.ChildBuilderImpl(); } } public SuperBuilderWithGenericsAndToBuilder() { diff --git a/test/transform/resource/after-ecj/SuperBuilderWithNonNull.java b/test/transform/resource/after-ecj/SuperBuilderWithNonNull.java index 31198ee1..f0a2bc00 100644 --- a/test/transform/resource/after-ecj/SuperBuilderWithNonNull.java +++ b/test/transform/resource/after-ecj/SuperBuilderWithNonNull.java @@ -1,7 +1,7 @@ import java.util.List; public class SuperBuilderWithNonNull { public static @lombok.experimental.SuperBuilder class Parent { - public static abstract @java.lang.SuppressWarnings("all") class ParentBuilder> { + public static abstract @java.lang.SuppressWarnings("all") class ParentBuilder> { private @java.lang.SuppressWarnings("all") String nonNullParentField$value; private @java.lang.SuppressWarnings("all") boolean nonNullParentField$set; public ParentBuilder() { @@ -22,38 +22,38 @@ public class SuperBuilderWithNonNull { return (("SuperBuilderWithNonNull.Parent.ParentBuilder(nonNullParentField$value=" + this.nonNullParentField$value) + ")"); } } - private static final @java.lang.SuppressWarnings("all") class ParentBuilderImpl extends ParentBuilder { + private static final @java.lang.SuppressWarnings("all") class ParentBuilderImpl extends SuperBuilderWithNonNull.Parent.ParentBuilder { private ParentBuilderImpl() { super(); } - protected @java.lang.Override @java.lang.SuppressWarnings("all") ParentBuilderImpl self() { + protected @java.lang.Override @java.lang.SuppressWarnings("all") SuperBuilderWithNonNull.Parent.ParentBuilderImpl self() { return this; } - public @java.lang.Override @java.lang.SuppressWarnings("all") Parent build() { - return new Parent(this); + public @java.lang.Override @java.lang.SuppressWarnings("all") SuperBuilderWithNonNull.Parent build() { + return new SuperBuilderWithNonNull.Parent(this); } } final @lombok.NonNull @lombok.Builder.Default String nonNullParentField; private static @java.lang.SuppressWarnings("all") String $default$nonNullParentField() { return "default"; } - protected @java.lang.SuppressWarnings("all") Parent(final ParentBuilder b) { + protected @java.lang.SuppressWarnings("all") Parent(final SuperBuilderWithNonNull.Parent.ParentBuilder b) { super(); if (b.nonNullParentField$set) this.nonNullParentField = b.nonNullParentField$value; else - this.nonNullParentField = Parent.$default$nonNullParentField(); + this.nonNullParentField = SuperBuilderWithNonNull.Parent.$default$nonNullParentField(); if ((nonNullParentField == null)) { throw new java.lang.NullPointerException("nonNullParentField is marked non-null but is null"); } } - public static @java.lang.SuppressWarnings("all") ParentBuilder builder() { - return new ParentBuilderImpl(); + public static @java.lang.SuppressWarnings("all") SuperBuilderWithNonNull.Parent.ParentBuilder builder() { + return new SuperBuilderWithNonNull.Parent.ParentBuilderImpl(); } } public static @lombok.experimental.SuperBuilder class Child extends Parent { - public static abstract @java.lang.SuppressWarnings("all") class ChildBuilder> extends Parent.ParentBuilder { + public static abstract @java.lang.SuppressWarnings("all") class ChildBuilder> extends Parent.ParentBuilder { private @java.lang.SuppressWarnings("all") String nonNullChildField; public ChildBuilder() { super(); @@ -72,19 +72,19 @@ public class SuperBuilderWithNonNull { return (((("SuperBuilderWithNonNull.Child.ChildBuilder(super=" + super.toString()) + ", nonNullChildField=") + this.nonNullChildField) + ")"); } } - private static final @java.lang.SuppressWarnings("all") class ChildBuilderImpl extends ChildBuilder { + private static final @java.lang.SuppressWarnings("all") class ChildBuilderImpl extends SuperBuilderWithNonNull.Child.ChildBuilder { private ChildBuilderImpl() { super(); } - protected @java.lang.Override @java.lang.SuppressWarnings("all") ChildBuilderImpl self() { + protected @java.lang.Override @java.lang.SuppressWarnings("all") SuperBuilderWithNonNull.Child.ChildBuilderImpl self() { return this; } - public @java.lang.Override @java.lang.SuppressWarnings("all") Child build() { - return new Child(this); + public @java.lang.Override @java.lang.SuppressWarnings("all") SuperBuilderWithNonNull.Child build() { + return new SuperBuilderWithNonNull.Child(this); } } @lombok.NonNull String nonNullChildField; - protected @java.lang.SuppressWarnings("all") Child(final ChildBuilder b) { + protected @java.lang.SuppressWarnings("all") Child(final SuperBuilderWithNonNull.Child.ChildBuilder b) { super(b); this.nonNullChildField = b.nonNullChildField; if ((nonNullChildField == null)) @@ -92,8 +92,8 @@ public class SuperBuilderWithNonNull { throw new java.lang.NullPointerException("nonNullChildField is marked non-null but is null"); } } - public static @java.lang.SuppressWarnings("all") ChildBuilder builder() { - return new ChildBuilderImpl(); + public static @java.lang.SuppressWarnings("all") SuperBuilderWithNonNull.Child.ChildBuilder builder() { + return new SuperBuilderWithNonNull.Child.ChildBuilderImpl(); } } public SuperBuilderWithNonNull() { diff --git a/test/transform/resource/after-ecj/SuperBuilderWithPrefixes.java b/test/transform/resource/after-ecj/SuperBuilderWithPrefixes.java index 5dbdfacc..51abbca4 100644 --- a/test/transform/resource/after-ecj/SuperBuilderWithPrefixes.java +++ b/test/transform/resource/after-ecj/SuperBuilderWithPrefixes.java @@ -1,5 +1,5 @@ @lombok.experimental.SuperBuilder class SuperBuilderWithPrefixes { - public static abstract @java.lang.SuppressWarnings("all") class SuperBuilderWithPrefixesBuilder> { + public static abstract @java.lang.SuppressWarnings("all") class SuperBuilderWithPrefixesBuilder> { private @java.lang.SuppressWarnings("all") int field; private @java.lang.SuppressWarnings("all") int otherField; private @java.lang.SuppressWarnings("all") java.util.ArrayList items; @@ -37,11 +37,11 @@ return (((((("SuperBuilderWithPrefixes.SuperBuilderWithPrefixesBuilder(field=" + this.field) + ", otherField=") + this.otherField) + ", items=") + this.items) + ")"); } } - private static final @java.lang.SuppressWarnings("all") class SuperBuilderWithPrefixesBuilderImpl extends SuperBuilderWithPrefixesBuilder { + private static final @java.lang.SuppressWarnings("all") class SuperBuilderWithPrefixesBuilderImpl extends SuperBuilderWithPrefixes.SuperBuilderWithPrefixesBuilder { private SuperBuilderWithPrefixesBuilderImpl() { super(); } - protected @java.lang.Override @java.lang.SuppressWarnings("all") SuperBuilderWithPrefixesBuilderImpl self() { + protected @java.lang.Override @java.lang.SuppressWarnings("all") SuperBuilderWithPrefixes.SuperBuilderWithPrefixesBuilderImpl self() { return this; } public @java.lang.Override @java.lang.SuppressWarnings("all") SuperBuilderWithPrefixes build() { @@ -51,7 +51,7 @@ int mField; int xOtherField; @lombok.Singular java.util.List mItems; - protected @java.lang.SuppressWarnings("all") SuperBuilderWithPrefixes(final SuperBuilderWithPrefixesBuilder b) { + protected @java.lang.SuppressWarnings("all") SuperBuilderWithPrefixes(final SuperBuilderWithPrefixes.SuperBuilderWithPrefixesBuilder b) { super(); this.mField = b.field; this.xOtherField = b.otherField; @@ -68,7 +68,7 @@ } this.mItems = items; } - public static @java.lang.SuppressWarnings("all") SuperBuilderWithPrefixesBuilder builder() { - return new SuperBuilderWithPrefixesBuilderImpl(); + public static @java.lang.SuppressWarnings("all") SuperBuilderWithPrefixes.SuperBuilderWithPrefixesBuilder builder() { + return new SuperBuilderWithPrefixes.SuperBuilderWithPrefixesBuilderImpl(); } } diff --git a/test/transform/resource/before/BuilderSingularGuavaListsSetsWithSetterPrefix.java b/test/transform/resource/before/BuilderSingularGuavaListsSetsWithSetterPrefix.java deleted file mode 100644 index af02adb6..00000000 --- a/test/transform/resource/before/BuilderSingularGuavaListsSetsWithSetterPrefix.java +++ /dev/null @@ -1,16 +0,0 @@ -import com.google.common.collect.ImmutableList; -import com.google.common.collect.ImmutableCollection; -import com.google.common.collect.ImmutableSet; -import com.google.common.collect.ImmutableSortedSet; -import com.google.common.collect.ImmutableTable; - -import lombok.Singular; - -@lombok.Builder(setterPrefix = "with") -class BuilderSingularGuavaListsSetsWithSetterPrefix { - @Singular private ImmutableList cards; - @Singular private ImmutableCollection frogs; - @SuppressWarnings("all") @Singular("rawSet") private ImmutableSet rawSet; - @Singular private ImmutableSortedSet passes; - @Singular private ImmutableTable users; -} diff --git a/test/transform/resource/before/BuilderSingularGuavaMapsWithSetterPrefix.java b/test/transform/resource/before/BuilderSingularGuavaMapsWithSetterPrefix.java deleted file mode 100644 index a2b48cb3..00000000 --- a/test/transform/resource/before/BuilderSingularGuavaMapsWithSetterPrefix.java +++ /dev/null @@ -1,12 +0,0 @@ -import com.google.common.collect.ImmutableMap; -import com.google.common.collect.ImmutableBiMap; -import com.google.common.collect.ImmutableSortedMap; - -import lombok.Singular; - -@lombok.Builder(setterPrefix = "with") -class BuilderSingularGuavaMapsWithSetterPrefix { - @Singular private ImmutableMap battleaxes; - @Singular private ImmutableSortedMap vertices; - @SuppressWarnings("all") @Singular("rawMap") private ImmutableBiMap rawMap; -} diff --git a/test/transform/resource/before/BuilderSingularListsWithSetterPrefix.java b/test/transform/resource/before/BuilderSingularListsWithSetterPrefix.java deleted file mode 100644 index fd53d97f..00000000 --- a/test/transform/resource/before/BuilderSingularListsWithSetterPrefix.java +++ /dev/null @@ -1,11 +0,0 @@ -import java.util.List; -import java.util.Collection; - -import lombok.Singular; - -@lombok.Builder(setterPrefix = "with") -class BuilderSingularListsWithSetterPrefix { - @Singular private List children; - @Singular private Collection scarves; - @SuppressWarnings("all") @Singular("rawList") private List rawList; -} diff --git a/test/transform/resource/before/BuilderSingularRedirectToGuavaWithSetterPrefix.java b/test/transform/resource/before/BuilderSingularRedirectToGuavaWithSetterPrefix.java deleted file mode 100644 index 7281141d..00000000 --- a/test/transform/resource/before/BuilderSingularRedirectToGuavaWithSetterPrefix.java +++ /dev/null @@ -1,13 +0,0 @@ -//CONF: lombok.singular.useGuava = true -import java.util.Set; -import java.util.NavigableMap; -import java.util.Collection; - -import lombok.Singular; - -@lombok.Builder(setterPrefix = "with") -class BuilderSingularRedirectToGuavaWithSetterPrefix { - @Singular private Set dangerMice; - @Singular private NavigableMap things; - @Singular private Collection> doohickeys; -} diff --git a/test/transform/resource/before/BuilderSingularWildcardListsWithToBuilderWithSetterPrefix.java b/test/transform/resource/before/BuilderSingularWildcardListsWithToBuilderWithSetterPrefix.java deleted file mode 100644 index cea10bab..00000000 --- a/test/transform/resource/before/BuilderSingularWildcardListsWithToBuilderWithSetterPrefix.java +++ /dev/null @@ -1,10 +0,0 @@ -import java.util.List; -import java.util.Collection; - -import lombok.Singular; - -@lombok.Builder(toBuilder = true, setterPrefix = "with") -class BuilderSingularWildcardListsWithToBuilderWithSetterPrefix { - @Singular private List objects; - @Singular private Collection numbers; -} diff --git a/test/transform/resource/before/BuilderWithAccessorsWithSetterPrefix.java b/test/transform/resource/before/BuilderWithAccessorsWithSetterPrefix.java deleted file mode 100644 index 4f4ebb18..00000000 --- a/test/transform/resource/before/BuilderWithAccessorsWithSetterPrefix.java +++ /dev/null @@ -1,7 +0,0 @@ -@lombok.Builder(setterPrefix = "with") @lombok.experimental.Accessors(prefix={"p", "_"}) -class BuilderWithAccessorsWithSetterPrefix { - private final int plower; - private final int pUpper; - private int _foo; - private int __bar; -} diff --git a/test/transform/resource/before/BuilderWithBadNamesWithSetterPrefix.java b/test/transform/resource/before/BuilderWithBadNamesWithSetterPrefix.java deleted file mode 100644 index 69322ee3..00000000 --- a/test/transform/resource/before/BuilderWithBadNamesWithSetterPrefix.java +++ /dev/null @@ -1,5 +0,0 @@ -@lombok.Builder(setterPrefix = "with") -public class BuilderWithBadNamesWithSetterPrefix { - String build; - String toString; -} diff --git a/test/transform/resource/before/BuilderWithDeprecatedWithSetterPrefix.java b/test/transform/resource/before/BuilderWithDeprecatedWithSetterPrefix.java deleted file mode 100644 index 77baccd3..00000000 --- a/test/transform/resource/before/BuilderWithDeprecatedWithSetterPrefix.java +++ /dev/null @@ -1,11 +0,0 @@ -import com.google.common.collect.ImmutableList; -import lombok.Builder; -import lombok.Singular; - -@Builder(setterPrefix = "with") -public class BuilderWithDeprecatedWithSetterPrefix { - /** @deprecated since always */ String dep1; - @Deprecated int dep2; - @Singular @Deprecated java.util.List strings; - @Singular @Deprecated ImmutableList numbers; -} diff --git a/test/transform/resource/before/BuilderWithNoBuilderMethodWithSetterPrefix.java b/test/transform/resource/before/BuilderWithNoBuilderMethodWithSetterPrefix.java deleted file mode 100644 index 80197dd3..00000000 --- a/test/transform/resource/before/BuilderWithNoBuilderMethodWithSetterPrefix.java +++ /dev/null @@ -1,5 +0,0 @@ -import lombok.Builder; -@Builder(toBuilder = true, builderMethodName = "",setterPrefix = "with") -class BuilderWithNoBuilderMethodWithSetterPrefix { - private String a = ""; -} diff --git a/test/transform/resource/before/BuilderWithRecursiveGenericsWithSetterPrefix.java b/test/transform/resource/before/BuilderWithRecursiveGenericsWithSetterPrefix.java deleted file mode 100644 index ce8803c0..00000000 --- a/test/transform/resource/before/BuilderWithRecursiveGenericsWithSetterPrefix.java +++ /dev/null @@ -1,13 +0,0 @@ -//issue #1298 -import java.util.Set; -import lombok.Builder; -import lombok.Value; - -public class BuilderWithRecursiveGenericsWithSetterPrefix { - interface Inter> {} - - @Builder(setterPrefix = "with") @Value public static class Test, Quz extends Inter> { - Foo foo; - Bar bar; - } -} diff --git a/test/transform/resource/before/BuilderWithToBuilderWithSetterPrefix.java b/test/transform/resource/before/BuilderWithToBuilderWithSetterPrefix.java deleted file mode 100644 index 3b442b8d..00000000 --- a/test/transform/resource/before/BuilderWithToBuilderWithSetterPrefix.java +++ /dev/null @@ -1,20 +0,0 @@ -import java.util.List; -import lombok.Builder; -@Builder(toBuilder = true, setterPrefix = "with") @lombok.experimental.Accessors(prefix = "m") -class BuilderWithToBuilderWithSetterPrefix { - private String mOne, mTwo; - @Builder.ObtainVia(method = "rrr", isStatic = true) private T foo; - @lombok.Singular private List bars; - public static K rrr(BuilderWithToBuilderWithSetterPrefix x) { - return x.foo; - } -} -@lombok.experimental.Accessors(prefix = "m") -class ConstructorWithToBuilderWithSetterPrefix { - private String mOne, mTwo; - private T foo; - @lombok.Singular private com.google.common.collect.ImmutableList bars; - @Builder(toBuilder = true, setterPrefix = "with") - public ConstructorWithToBuilderWithSetterPrefix(String mOne, @Builder.ObtainVia(field = "foo") T baz, com.google.common.collect.ImmutableList bars) { - } -} diff --git a/test/transform/resource/before/BuilderWithTolerateWithSetterPrefix.java b/test/transform/resource/before/BuilderWithTolerateWithSetterPrefix.java deleted file mode 100644 index 5c77e177..00000000 --- a/test/transform/resource/before/BuilderWithTolerateWithSetterPrefix.java +++ /dev/null @@ -1,18 +0,0 @@ -import lombok.Builder; -import lombok.experimental.Tolerate; - -@Builder(setterPrefix = "with") -public class BuilderWithTolerateWithSetterPrefix { - private final int value; - - public static void main(String[] args) { - BuilderWithTolerateWithSetterPrefix.builder().withValue("42").build(); - } - - public static class BuilderWithTolerateWithSetterPrefixBuilder { - @Tolerate - public BuilderWithTolerateWithSetterPrefixBuilder withValue(String s) { - return this.withValue(Integer.parseInt(s)); - } - } -} -- cgit