aboutsummaryrefslogtreecommitdiff
path: root/usage_examples/GetterSetterExample_pre.jpage
blob: c40ec1062df5237622411e6d986ca8ed1633004c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
import lombok.AccessLevel;
import lombok.Getter;
import lombok.Setter;

public class GetterSetterExample {
	private @Getter @Setter int age = 10;
	private @Setter(AccessLevel.PROTECTED) String name;
	
	@Override public String toString() {
		return String.format("%s (age: %d)", name, age);
	}
}