@Builder for class with inherited superclass

3,084 views
Skip to first unread message

dnno

unread,
May 27, 2015, 5:41:07 AM5/27/15
to project...@googlegroups.com
When using the @Builder annotation on a pojo that inherits from another class, Lombok will only consider the fields of the original pojo in the builder creation, but not the fields provided by the superclass. Is there a way to work around this? 

Marius Kruger

unread,
May 27, 2015, 6:02:38 AM5/27/15
to project...@googlegroups.com, dnno
Maybe make an explicit constructor or a static method and put the @Builder on that.

On 27 May 2015 at 10:40, dnno <reinhard...@gmail.com> wrote:
When using the @Builder annotation on a pojo that inherits from another class, Lombok will only consider the fields of the original pojo in the builder creation, but not the fields provided by the superclass. Is there a way to work around this? 

--
You received this message because you are subscribed to the Google Groups "Project Lombok" group.
To unsubscribe from this group and stop receiving emails from it, send an email to project-lombo...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
✝ Marius
Reply all
Reply to author
Forward
0 new messages