I'm making a Builder using lombok but have noticed that if I overload a setter, it stops generating the original.
In example below, there's no setter for NamedIdentity player anymore. In my case, I want both the original and the overload. I don't see any documentation that forces the original so I see only two options:
public class Activity {
@Builder()
public Activity(NamedIdentity player) {}
public static class ActivityBuilder {
public ActivityBuilder player(UUID uuid, String name) {
this.player = new NamedIdentity(uuid, name));
return this;
}
}
}
Is there another way to accomplish this?
You can make Lombok ignore existing methods by annotating them with @Tolerate.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With