mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-14 10:18:46 +00:00
[With] updated documentation for Wither/With
This commit is contained in:
8 files changed
+90
-101
No files matched your search
@@ -0,0 +1,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;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user