aboutsummaryrefslogtreecommitdiff
path: root/test/transform/resource/after-delombok/BuilderSingularNullBehavior2.java
diff options
context:
space:
mode:
authorReinier Zwitserloot <r.zwitserloot@projectlombok.org>2020-01-31 15:58:19 +0100
committerReinier Zwitserloot <r.zwitserloot@projectlombok.org>2020-01-31 15:58:19 +0100
commit3f0fec18726fb9c9f4dce614dbcfa650c1c04bf7 (patch)
treed03abb38a198bbe5417e3aa1e1f7c55b03f32e63 /test/transform/resource/after-delombok/BuilderSingularNullBehavior2.java
parentc42bfbae39990b365a5f05eb23895da6203023bc (diff)
downloadlombok-3f0fec18726fb9c9f4dce614dbcfa650c1c04bf7.tar.gz
lombok-3f0fec18726fb9c9f4dce614dbcfa650c1c04bf7.tar.bz2
lombok-3f0fec18726fb9c9f4dce614dbcfa650c1c04bf7.zip
[issue #788] Add more nullity annotations where relevant
(chainable setters, static constructors, builder stuff)
Diffstat (limited to 'test/transform/resource/after-delombok/BuilderSingularNullBehavior2.java')
-rw-r--r--test/transform/resource/after-delombok/BuilderSingularNullBehavior2.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/transform/resource/after-delombok/BuilderSingularNullBehavior2.java b/test/transform/resource/after-delombok/BuilderSingularNullBehavior2.java
index ba70002b..e70877bf 100644
--- a/test/transform/resource/after-delombok/BuilderSingularNullBehavior2.java
+++ b/test/transform/resource/after-delombok/BuilderSingularNullBehavior2.java
@@ -12,12 +12,14 @@ class BuilderSingularNullBehavior2 {
@java.lang.SuppressWarnings("all")
BuilderSingularNullBehavior2Builder() {
}
+ @org.springframework.lang.NonNull
@java.lang.SuppressWarnings("all")
public BuilderSingularNullBehavior2.BuilderSingularNullBehavior2Builder location(final String location) {
if (this.locations == null) this.locations = new java.util.ArrayList<String>();
this.locations.add(location);
return this;
}
+ @org.springframework.lang.NonNull
@java.lang.SuppressWarnings("all")
public BuilderSingularNullBehavior2.BuilderSingularNullBehavior2Builder locations(@org.springframework.lang.NonNull final java.util.Collection<? extends String> locations) {
java.util.Objects.requireNonNull(locations, "locations cannot be null");
@@ -25,11 +27,13 @@ class BuilderSingularNullBehavior2 {
this.locations.addAll(locations);
return this;
}
+ @org.springframework.lang.NonNull
@java.lang.SuppressWarnings("all")
public BuilderSingularNullBehavior2.BuilderSingularNullBehavior2Builder clearLocations() {
if (this.locations != null) this.locations.clear();
return this;
}
+ @org.springframework.lang.NonNull
@java.lang.SuppressWarnings("all")
public BuilderSingularNullBehavior2 build() {
java.util.List<String> locations;
@@ -52,6 +56,7 @@ class BuilderSingularNullBehavior2 {
return "BuilderSingularNullBehavior2.BuilderSingularNullBehavior2Builder(locations=" + this.locations + ")";
}
}
+ @org.springframework.lang.NonNull
@java.lang.SuppressWarnings("all")
public static BuilderSingularNullBehavior2.BuilderSingularNullBehavior2Builder builder() {
return new BuilderSingularNullBehavior2.BuilderSingularNullBehavior2Builder();