aboutsummaryrefslogtreecommitdiff
path: root/src/core/lombok/javac/handlers/HandleSuperBuilder.java
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@zwitserloot.com>2021-03-24 06:24:02 +0100
committerGitHub <noreply@github.com>2021-03-24 06:24:02 +0100
commit30a2921e6321d20f0f925694dfd6a32d9e1f1552 (patch)
treeeedf6a2cd9f2051cb926d64fad031c387f4916da /src/core/lombok/javac/handlers/HandleSuperBuilder.java
parent52a31bc4ae2806907194d32567a820c670670357 (diff)
parenta6257f27f0831ed2c9971285a3bb29f73fabbb02 (diff)
downloadlombok-30a2921e6321d20f0f925694dfd6a32d9e1f1552.tar.gz
lombok-30a2921e6321d20f0f925694dfd6a32d9e1f1552.tar.bz2
lombok-30a2921e6321d20f0f925694dfd6a32d9e1f1552.zip
Merge pull request #2687 from janrieke/superBuilderConfigBuilderClassName
SuperBuilder: consider lombok.builder.className for builder extends clause
Diffstat (limited to 'src/core/lombok/javac/handlers/HandleSuperBuilder.java')
-rw-r--r--src/core/lombok/javac/handlers/HandleSuperBuilder.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/core/lombok/javac/handlers/HandleSuperBuilder.java b/src/core/lombok/javac/handlers/HandleSuperBuilder.java
index 9185cedf..8974cd68 100644
--- a/src/core/lombok/javac/handlers/HandleSuperBuilder.java
+++ b/src/core/lombok/javac/handlers/HandleSuperBuilder.java
@@ -111,7 +111,7 @@ public class HandleSuperBuilder extends JavacAnnotationHandler<SuperBuilder> {
if (builderMethodName == null) builderMethodName = "builder";
if (buildMethodName == null) buildMethodName = "build";
- builderClassName = fixBuilderClassName(node, "");
+ builderClassName = getBuilderClassNameTemplate(node, null);
}
void setBuilderToImpl() {
@@ -253,10 +253,12 @@ public class HandleSuperBuilder extends JavacAnnotationHandler<SuperBuilder> {
}
if (extendsClause instanceof JCFieldAccess) {
Name superclassName = ((JCFieldAccess) extendsClause).getIdentifier();
- String superclassBuilderClassName = superclassName.toString() + "Builder";
+ String builderClassNameTemplate = BuilderJob.getBuilderClassNameTemplate(annotationNode, null);
+ String superclassBuilderClassName = job.replaceBuilderClassName(superclassName.toString(), builderClassNameTemplate);
superclassBuilderClass = parent.getTreeMaker().Select((JCFieldAccess) extendsClause, parent.toName(superclassBuilderClassName));
} else if (extendsClause != null) {
- String superclassBuilderClassName = extendsClause.toString() + "Builder";
+ String builderClassNameTemplate = BuilderJob.getBuilderClassNameTemplate(annotationNode, null);
+ String superclassBuilderClassName = job.replaceBuilderClassName(extendsClause.toString(), builderClassNameTemplate);
superclassBuilderClass = chainDots(parent, extendsClause.toString(), superclassBuilderClassName);
}