blob: 5db799fc0a76a36198028fa069c41ae6528ec0be (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
import lombok.AccessLevel;
import lombok.NonNull;
import lombok.experimental.Wither;
public class WitherExample {
@Wither private final int age;
@Wither(AccessLevel.PROTECTED) @NonNull private final String name;
public WitherExample(String name, int age) {
if (name == null) throw new NullPointerException();
this.name = name;
this.age = age;
}
}
|