aboutsummaryrefslogtreecommitdiff
path: root/website/usageExamples/WithExample_pre.jpage
diff options
context:
space:
mode:
authorCaleb Brinkman <cbrinkman@sonatype.com>2019-09-11 09:17:02 -0500
committerCaleb Brinkman <cbrinkman@sonatype.com>2019-09-11 09:17:02 -0500
commitdc56309dada0ae0fba2c939d3fc300d6abac145c (patch)
treef79b31cb086a368aa467f359b84923bca1ecaa6b /website/usageExamples/WithExample_pre.jpage
parent4dc5c32d6b47264b5c8abb6fdf24077eec5aa7e7 (diff)
parent8c32769f18361ed626ebd06962d924c288950d26 (diff)
downloadlombok-dc56309dada0ae0fba2c939d3fc300d6abac145c.tar.gz
lombok-dc56309dada0ae0fba2c939d3fc300d6abac145c.tar.bz2
lombok-dc56309dada0ae0fba2c939d3fc300d6abac145c.zip
Merge branch 'master' of github.com:rzwitserloot/lombok into feature/builder-setter-prefixes
Diffstat (limited to 'website/usageExamples/WithExample_pre.jpage')
-rw-r--r--website/usageExamples/WithExample_pre.jpage14
1 files changed, 14 insertions, 0 deletions
diff --git a/website/usageExamples/WithExample_pre.jpage b/website/usageExamples/WithExample_pre.jpage
new file mode 100644
index 00000000..3c76204e
--- /dev/null
+++ b/website/usageExamples/WithExample_pre.jpage
@@ -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;
+ }
+}