@Tolerate
Skip, jump, and forget! Make lombok disregard an existing method or constructor.
@Tolerate was introduced as feature in lombok v1.14.2
Experimental
Experimental because:- Not used that much.
- Difficult to support for edge cases, such as recursive delegation.
Overview
Any method or constructor can be annotated with @Tolerate and lombok will act as if it
does not exist. For example, normally lombok would not generate a setDate method for field
named date if you already have a method named setDate in your code already. By
annotating that method with @Tolerate, lombok will generate it anyway. This can be useful if the
type of the parameter of your existing method is different and doesn't clash.
Put on any method or constructor to make lombok pretend it doesn't exist, i.e., to generate a method which would otherwise be skipped due to possible conflicts.
With Lombok
import lombok.experimental.Tolerate;
|
Vanilla Java
public class TolerateExample {
|