mirror of
https://github.com/tiennm99/lombok.git
synced 2026-05-26 10:00:47 +00:00
15 lines
337 B
Plaintext
15 lines
337 B
Plaintext
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;
|
|
}
|
|
}
|