How to implements Lombok @Builder for Abstract class
问题 I have classes that extend an abstract class and I don't want to put @Builder on top of the all child classes. Is there any way to implement Lombok @Builder for an abstract class? 回答1: Not possible at all. The builder is generated into the super class during compiling and it can not have any knowledge of the possible sub classes that will eventually implement it. For example, the sub class could have constructors that have to be used for the instance to have a valid state and Lombok can not