blob: 5c77e17742bf6afaf134a3deabfe1adfb64135b3 (
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 BuilderWithTolerateWithSetterPrefix {
private final int value;
public static void main(String[] args) {
BuilderWithTolerateWithSetterPrefix.builder().withValue("42").build();
}
public static class BuilderWithTolerateWithSetterPrefixBuilder {
@Tolerate
public BuilderWithTolerateWithSetterPrefixBuilder withValue(String s) {
return this.withValue(Integer.parseInt(s));
}
}
}
|