diff options
author | Jan Rieke <rieke@subshell.com> | 2018-08-21 12:47:52 +0200 |
---|---|---|
committer | Roel Spilker <r.spilker@gmail.com> | 2018-08-27 21:38:19 +0200 |
commit | ca2b8c281b6efd1ebc99b212483c9751834f570b (patch) | |
tree | 57905dc938ee922f4ef3cfdf7b0858665eb9ea9c /src/core/lombok/eclipse | |
parent | e23cf0bcbeb2f5562adf0512048766712ac83774 (diff) | |
download | lombok-ca2b8c281b6efd1ebc99b212483c9751834f570b.tar.gz lombok-ca2b8c281b6efd1ebc99b212483c9751834f570b.tar.bz2 lombok-ca2b8c281b6efd1ebc99b212483c9751834f570b.zip |
SuperBuilder now with generics on self() method
Diffstat (limited to 'src/core/lombok/eclipse')
-rw-r--r-- | src/core/lombok/eclipse/handlers/HandleSuperBuilder.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/lombok/eclipse/handlers/HandleSuperBuilder.java b/src/core/lombok/eclipse/handlers/HandleSuperBuilder.java index a0102220..413bdd5d 100644 --- a/src/core/lombok/eclipse/handlers/HandleSuperBuilder.java +++ b/src/core/lombok/eclipse/handlers/HandleSuperBuilder.java @@ -337,7 +337,7 @@ public class HandleSuperBuilder extends EclipseAnnotationHandler<SuperBuilder> { } // Create the self() and build() methods in the BuilderImpl. - injectMethod(builderImplType, generateSelfMethod(builderImplType)); + injectMethod(builderImplType, generateSelfMethod(builderImplType, typeParams, p)); injectMethod(builderImplType, generateBuildMethod(tdParent, buildMethodName, returnType, ast)); // Add the builder() method to the annotated class. @@ -544,13 +544,13 @@ public class HandleSuperBuilder extends EclipseAnnotationHandler<SuperBuilder> { return out; } - private MethodDeclaration generateSelfMethod(EclipseNode builderImplType) { + private MethodDeclaration generateSelfMethod(EclipseNode builderImplType, TypeParameter[] typeParams, long p) { MethodDeclaration out = new MethodDeclaration(((CompilationUnitDeclaration) builderImplType.top().get()).compilationResult); out.selector = SELF_METHOD_NAME; out.bits |= ECLIPSE_DO_NOT_TOUCH_FLAG; out.modifiers = ClassFileConstants.AccProtected; out.annotations = new Annotation[] {makeMarkerAnnotation(TypeConstants.JAVA_LANG_OVERRIDE, builderImplType.get())}; - out.returnType = new SingleTypeReference(builderImplType.getName().toCharArray(), 0); + out.returnType = namePlusTypeParamsToTypeReference(builderImplType.getName().toCharArray(), typeParams, p); out.statements = new Statement[] {new ReturnStatement(new ThisReference(0, 0), 0, 0)}; return out; } |