aboutsummaryrefslogtreecommitdiff
path: root/website2/usageExamples/experimental/WitherExample_pre.jpage
diff options
context:
space:
mode:
Diffstat (limited to 'website2/usageExamples/experimental/WitherExample_pre.jpage')
-rw-r--r--website2/usageExamples/experimental/WitherExample_pre.jpage14
1 files changed, 14 insertions, 0 deletions
diff --git a/website2/usageExamples/experimental/WitherExample_pre.jpage b/website2/usageExamples/experimental/WitherExample_pre.jpage
new file mode 100644
index 00000000..5db799fc
--- /dev/null
+++ b/website2/usageExamples/experimental/WitherExample_pre.jpage
@@ -0,0 +1,14 @@
+import lombok.AccessLevel;
+import lombok.NonNull;
+import lombok.experimental.Wither;
+
+public class WitherExample {
+ @Wither private final int age;
+ @Wither(AccessLevel.PROTECTED) @NonNull private final String name;
+
+ public WitherExample(String name, int age) {
+ if (name == null) throw new NullPointerException();
+ this.name = name;
+ this.age = age;
+ }
+}