It would be nice to have an @OverrideConstructors annotation. This annotation would create one constructor for each constructor of the super class. That is a common use case if you subclass classes with multiple constructors.
I would be willing to try my hand on a pull request if you deem this annotation useful.
Can you give a code example of with and without your annotation?
Sure:
Without Lombok:
public class CustomException extends Exception {
public CustomException(String message) {
super(message);
}
public CustomException(String message, Throwable throwable) {
super(message, throwable);
}
public CustomException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
super(message, cause, enableSuppression, writableStackTrace);
}
...
}
With Lombok:
@OverrideConstructors
public class CustomException extends Exception {}
Issue #375
This requires resolution, not something lombok can do right now.
Most helpful comment
Sure:
Without Lombok:
With Lombok: