aboutsummaryrefslogtreecommitdiff
path: root/website/usageExamples/WithExample_pre.jpage
blob: 2f78020af2983dc049c59e85d9fb277fb36feead (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(AccessLevel.PROTECTED) @NonNull private final String name;
	@With private final int age;
	
	public WithExample(String name, int age) {
		if (name == null) throw new NullPointerException();
		this.name = name;
		this.age = age;
	}
}