aboutsummaryrefslogtreecommitdiff
path: root/test/transform/resource/after-delombok
diff options
context:
space:
mode:
Diffstat (limited to 'test/transform/resource/after-delombok')
-rw-r--r--test/transform/resource/after-delombok/BuilderSingularNullBehavior1.java15
-rw-r--r--test/transform/resource/after-delombok/BuilderSingularNullBehavior2.java5
-rw-r--r--test/transform/resource/after-delombok/StaticConstructor.java12
-rw-r--r--test/transform/resource/after-delombok/WithPlain.java2
4 files changed, 27 insertions, 7 deletions
diff --git a/test/transform/resource/after-delombok/BuilderSingularNullBehavior1.java b/test/transform/resource/after-delombok/BuilderSingularNullBehavior1.java
index 55420ac2..32ad0a68 100644
--- a/test/transform/resource/after-delombok/BuilderSingularNullBehavior1.java
+++ b/test/transform/resource/after-delombok/BuilderSingularNullBehavior1.java
@@ -18,31 +18,31 @@ class BuilderSingularNullBehavior1 {
BuilderSingularNullBehavior1Builder() {
}
@java.lang.SuppressWarnings("all")
- public BuilderSingularNullBehavior1.BuilderSingularNullBehavior1Builder name(final String name) {
+ public BuilderSingularNullBehavior1.@org.checkerframework.checker.nullness.qual.NonNull BuilderSingularNullBehavior1Builder name(final String name) {
if (this.names == null) this.names = new java.util.ArrayList<String>();
this.names.add(name);
return this;
}
@java.lang.SuppressWarnings("all")
- public BuilderSingularNullBehavior1.BuilderSingularNullBehavior1Builder names(final java.util.@org.checkerframework.checker.nullness.qual.NonNull Collection<? extends String> names) {
+ public BuilderSingularNullBehavior1.@org.checkerframework.checker.nullness.qual.NonNull BuilderSingularNullBehavior1Builder names(final java.util.@org.checkerframework.checker.nullness.qual.NonNull Collection<? extends String> names) {
assert names != null : "names cannot be null";
if (this.names == null) this.names = new java.util.ArrayList<String>();
this.names.addAll(names);
return this;
}
@java.lang.SuppressWarnings("all")
- public BuilderSingularNullBehavior1.BuilderSingularNullBehavior1Builder clearNames() {
+ public BuilderSingularNullBehavior1.@org.checkerframework.checker.nullness.qual.NonNull BuilderSingularNullBehavior1Builder clearNames() {
if (this.names != null) this.names.clear();
return this;
}
@java.lang.SuppressWarnings("all")
- public BuilderSingularNullBehavior1.BuilderSingularNullBehavior1Builder location(final String location) {
+ public BuilderSingularNullBehavior1.@org.checkerframework.checker.nullness.qual.NonNull BuilderSingularNullBehavior1Builder location(final String location) {
if (this.locations == null) this.locations = new java.util.ArrayList<String>();
this.locations.add(location);
return this;
}
@java.lang.SuppressWarnings("all")
- public BuilderSingularNullBehavior1.BuilderSingularNullBehavior1Builder locations(final java.util.@org.checkerframework.checker.nullness.qual.Nullable Collection<? extends String> locations) {
+ public BuilderSingularNullBehavior1.@org.checkerframework.checker.nullness.qual.NonNull BuilderSingularNullBehavior1Builder locations(final java.util.@org.checkerframework.checker.nullness.qual.Nullable Collection<? extends String> locations) {
if (locations != null) {
if (this.locations == null) this.locations = new java.util.ArrayList<String>();
this.locations.addAll(locations);
@@ -50,10 +50,11 @@ class BuilderSingularNullBehavior1 {
return this;
}
@java.lang.SuppressWarnings("all")
- public BuilderSingularNullBehavior1.BuilderSingularNullBehavior1Builder clearLocations() {
+ public BuilderSingularNullBehavior1.@org.checkerframework.checker.nullness.qual.NonNull BuilderSingularNullBehavior1Builder clearLocations() {
if (this.locations != null) this.locations.clear();
return this;
}
+ @org.checkerframework.checker.nullness.qual.NonNull
@java.lang.SuppressWarnings("all")
public BuilderSingularNullBehavior1 build() {
java.util.List<String> names;
@@ -87,7 +88,7 @@ class BuilderSingularNullBehavior1 {
}
}
@java.lang.SuppressWarnings("all")
- public static BuilderSingularNullBehavior1.BuilderSingularNullBehavior1Builder builder() {
+ public static BuilderSingularNullBehavior1.@org.checkerframework.checker.nullness.qual.NonNull BuilderSingularNullBehavior1Builder builder() {
return new BuilderSingularNullBehavior1.BuilderSingularNullBehavior1Builder();
}
}
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();
diff --git a/test/transform/resource/after-delombok/StaticConstructor.java b/test/transform/resource/after-delombok/StaticConstructor.java
new file mode 100644
index 00000000..f9c862d7
--- /dev/null
+++ b/test/transform/resource/after-delombok/StaticConstructor.java
@@ -0,0 +1,12 @@
+public class StaticConstructor {
+ String name;
+ @java.lang.SuppressWarnings("all")
+ private StaticConstructor(final String name) {
+ this.name = name;
+ }
+ @org.checkerframework.checker.nullness.qual.NonNull
+ @java.lang.SuppressWarnings("all")
+ public static StaticConstructor of(final String name) {
+ return new StaticConstructor(name);
+ }
+} \ No newline at end of file
diff --git a/test/transform/resource/after-delombok/WithPlain.java b/test/transform/resource/after-delombok/WithPlain.java
index 1a6ff22f..01fca04e 100644
--- a/test/transform/resource/after-delombok/WithPlain.java
+++ b/test/transform/resource/after-delombok/WithPlain.java
@@ -5,10 +5,12 @@ class WithPlain {
this.i = i;
this.foo = foo;
}
+ @org.springframework.lang.NonNull
@java.lang.SuppressWarnings("all")
public WithPlain withI(final int i) {
return this.i == i ? this : new WithPlain(i, this.foo);
}
+ @org.springframework.lang.NonNull
@java.lang.SuppressWarnings("all")
public WithPlain withFoo(final int foo) {
return this.foo == foo ? this : new WithPlain(this.i, foo);