aboutsummaryrefslogtreecommitdiff
path: root/website/usageExamples/WithExample_pre.jpage
blob: 3c76204e4d6cd9f1512d2281c71a83d15981b812 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import lombok.AccessLevel;
import lombok.NonNull;
import lombok.With;

public class WithExample {
	@With private final int age;
	@With(AccessLevel.PROTECTED) @NonNull private final String name;
	
	public WithExample(String name, int age) {
		if (name == null) throw new NullPointerException();
		this.name = name;
		this.age = age;
	}
}