aboutsummaryrefslogtreecommitdiff
path: root/src/core/lombok/eclipse/handlers/EclipseSingularsRecipes.java
diff options
context:
space:
mode:
authorReinier Zwitserloot <r.zwitserloot@projectlombok.org>2020-09-20 03:37:07 +0200
committerReinier Zwitserloot <r.zwitserloot@projectlombok.org>2020-09-20 03:37:07 +0200
commitfa89a5b0073177f0e16854a09d0a4cc62baec5ed (patch)
tree77ad2459e9ae8e1f8d0218fd8237ab6f0b32be58 /src/core/lombok/eclipse/handlers/EclipseSingularsRecipes.java
parentf6a6f9deb56ec0165bb383ff2608909fa60ddec5 (diff)
downloadlombok-fa89a5b0073177f0e16854a09d0a4cc62baec5ed.tar.gz
lombok-fa89a5b0073177f0e16854a09d0a4cc62baec5ed.tar.bz2
lombok-fa89a5b0073177f0e16854a09d0a4cc62baec5ed.zip
[builder] [refactor] # of params was growing to ridiculous proportions.
refactored to use a single object with a bunch of fields so we can pass this object around instead.
Diffstat (limited to 'src/core/lombok/eclipse/handlers/EclipseSingularsRecipes.java')
-rwxr-xr-xsrc/core/lombok/eclipse/handlers/EclipseSingularsRecipes.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/core/lombok/eclipse/handlers/EclipseSingularsRecipes.java b/src/core/lombok/eclipse/handlers/EclipseSingularsRecipes.java
index 85243ec1..760f5282 100755
--- a/src/core/lombok/eclipse/handlers/EclipseSingularsRecipes.java
+++ b/src/core/lombok/eclipse/handlers/EclipseSingularsRecipes.java
@@ -68,6 +68,7 @@ import lombok.core.SpiLoadUtil;
import lombok.core.TypeLibrary;
import lombok.core.configuration.CheckerFrameworkVersion;
import lombok.eclipse.EclipseNode;
+import lombok.eclipse.handlers.HandleBuilder.BuilderJob;
public class EclipseSingularsRecipes {
public interface TypeReferenceMaker {
@@ -258,20 +259,20 @@ public class EclipseSingularsRecipes {
* If you need more control over the return type and value, use
* {@link #generateMethods(SingularData, boolean, EclipseNode, boolean, TypeReferenceMaker, StatementMaker)}.
*/
- public void generateMethods(CheckerFrameworkVersion cfv, SingularData data, boolean deprecate, final EclipseNode builderType, boolean fluent, final boolean chain, AccessLevel access) {
+ public void generateMethods(final BuilderJob job, SingularData data, boolean deprecate) {
TypeReferenceMaker returnTypeMaker = new TypeReferenceMaker() {
@Override public TypeReference make() {
- return chain ? cloneSelfType(builderType) : TypeReference.baseTypeReference(TypeIds.T_void, 0);
+ return job.oldChain ? cloneSelfType(job.builderType) : TypeReference.baseTypeReference(TypeIds.T_void, 0);
}
};
StatementMaker returnStatementMaker = new StatementMaker() {
@Override public ReturnStatement make() {
- return chain ? new ReturnStatement(new ThisReference(0, 0), 0, 0) : null;
+ return job.oldChain ? new ReturnStatement(new ThisReference(0, 0), 0, 0) : null;
}
};
- generateMethods(cfv, data, deprecate, builderType, fluent, returnTypeMaker, returnStatementMaker, access);
+ generateMethods(job.checkerFramework, data, deprecate, job.builderType, job.oldFluent, returnTypeMaker, returnStatementMaker, job.accessInners);
}
/**