blob: 2f4db558e7f2203e585e20a56c146e55def9d687 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
import lombok.Builder;
import lombok.experimental.Tolerate;
@Builder(setterPrefix = "with")
public class BuilderWithTolerate {
private final int value;
public static void main(String[] args) {
BuilderWithTolerate.builder().value("42").build();
}
public static class BuilderWithTolerateBuilder {
@Tolerate
public BuilderWithTolerateBuilder value(String s) {
return this.value(Integer.parseInt(s));
}
}
}
|