diff options
Diffstat (limited to 'test/transform/resource/after-ecj')
4 files changed, 26 insertions, 15 deletions
diff --git a/test/transform/resource/after-ecj/BuilderSingularNullBehavior1.java b/test/transform/resource/after-ecj/BuilderSingularNullBehavior1.java index a0725f8a..94ef45eb 100644 --- a/test/transform/resource/after-ecj/BuilderSingularNullBehavior1.java +++ b/test/transform/resource/after-ecj/BuilderSingularNullBehavior1.java @@ -8,31 +8,31 @@ import lombok.Singular; @java.lang.SuppressWarnings("all") BuilderSingularNullBehavior1Builder() { super(); } - public @java.lang.SuppressWarnings("all") BuilderSingularNullBehavior1.BuilderSingularNullBehavior1Builder name(final String name) { + public @java.lang.SuppressWarnings("all") 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; } - public @java.lang.SuppressWarnings("all") BuilderSingularNullBehavior1.BuilderSingularNullBehavior1Builder names(final java.util. @org.checkerframework.checker.nullness.qual.NonNull Collection<? extends String> names) { + public @java.lang.SuppressWarnings("all") 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; } - public @java.lang.SuppressWarnings("all") BuilderSingularNullBehavior1.BuilderSingularNullBehavior1Builder clearNames() { + public @java.lang.SuppressWarnings("all") BuilderSingularNullBehavior1.@org.checkerframework.checker.nullness.qual.NonNull BuilderSingularNullBehavior1Builder clearNames() { if ((this.names != null)) this.names.clear(); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularNullBehavior1.BuilderSingularNullBehavior1Builder location(final String location) { + public @java.lang.SuppressWarnings("all") 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; } - public @java.lang.SuppressWarnings("all") BuilderSingularNullBehavior1.BuilderSingularNullBehavior1Builder locations(final java.util. @org.checkerframework.checker.nullness.qual.Nullable Collection<? extends String> locations) { + public @java.lang.SuppressWarnings("all") 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)) @@ -41,12 +41,12 @@ import lombok.Singular; } return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularNullBehavior1.BuilderSingularNullBehavior1Builder clearLocations() { + public @java.lang.SuppressWarnings("all") BuilderSingularNullBehavior1.@org.checkerframework.checker.nullness.qual.NonNull BuilderSingularNullBehavior1Builder clearLocations() { if ((this.locations != null)) this.locations.clear(); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularNullBehavior1 build() { + public @org.checkerframework.checker.nullness.qual.NonNull @java.lang.SuppressWarnings("all") BuilderSingularNullBehavior1 build() { java.util.List<String> names; switch (((this.names == null) ? 0 : this.names.size())) { case 0 : @@ -82,7 +82,7 @@ import lombok.Singular; this.names = names; this.locations = locations; } - public static @java.lang.SuppressWarnings("all") BuilderSingularNullBehavior1.BuilderSingularNullBehavior1Builder builder() { + public static @java.lang.SuppressWarnings("all") BuilderSingularNullBehavior1.@org.checkerframework.checker.nullness.qual.NonNull BuilderSingularNullBehavior1Builder builder() { return new BuilderSingularNullBehavior1.BuilderSingularNullBehavior1Builder(); } }
\ No newline at end of file diff --git a/test/transform/resource/after-ecj/BuilderSingularNullBehavior2.java b/test/transform/resource/after-ecj/BuilderSingularNullBehavior2.java index 85f9fb21..cf4bd91b 100644 --- a/test/transform/resource/after-ecj/BuilderSingularNullBehavior2.java +++ b/test/transform/resource/after-ecj/BuilderSingularNullBehavior2.java @@ -6,25 +6,25 @@ import lombok.Singular; @java.lang.SuppressWarnings("all") BuilderSingularNullBehavior2Builder() { super(); } - public @java.lang.SuppressWarnings("all") BuilderSingularNullBehavior2.BuilderSingularNullBehavior2Builder location(final String location) { + public @org.springframework.lang.NonNull @java.lang.SuppressWarnings("all") BuilderSingularNullBehavior2.BuilderSingularNullBehavior2Builder location(final String location) { if ((this.locations == null)) this.locations = new java.util.ArrayList<String>(); this.locations.add(location); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularNullBehavior2.BuilderSingularNullBehavior2Builder locations(final @org.springframework.lang.NonNull java.util.Collection<? extends String> locations) { + public @org.springframework.lang.NonNull @java.lang.SuppressWarnings("all") BuilderSingularNullBehavior2.BuilderSingularNullBehavior2Builder locations(final @org.springframework.lang.NonNull java.util.Collection<? extends String> locations) { java.util.Objects.requireNonNull(locations, "locations cannot be null"); if ((this.locations == null)) this.locations = new java.util.ArrayList<String>(); this.locations.addAll(locations); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularNullBehavior2.BuilderSingularNullBehavior2Builder clearLocations() { + public @org.springframework.lang.NonNull @java.lang.SuppressWarnings("all") BuilderSingularNullBehavior2.BuilderSingularNullBehavior2Builder clearLocations() { if ((this.locations != null)) this.locations.clear(); return this; } - public @java.lang.SuppressWarnings("all") BuilderSingularNullBehavior2 build() { + public @org.springframework.lang.NonNull @java.lang.SuppressWarnings("all") BuilderSingularNullBehavior2 build() { java.util.List<String> locations; switch (((this.locations == null) ? 0 : this.locations.size())) { case 0 : @@ -47,7 +47,7 @@ import lombok.Singular; super(); this.locations = locations; } - public static @java.lang.SuppressWarnings("all") BuilderSingularNullBehavior2.BuilderSingularNullBehavior2Builder builder() { + public static @org.springframework.lang.NonNull @java.lang.SuppressWarnings("all") BuilderSingularNullBehavior2.BuilderSingularNullBehavior2Builder builder() { return new BuilderSingularNullBehavior2.BuilderSingularNullBehavior2Builder(); } }
\ No newline at end of file diff --git a/test/transform/resource/after-ecj/StaticConstructor.java b/test/transform/resource/after-ecj/StaticConstructor.java new file mode 100644 index 00000000..93308faa --- /dev/null +++ b/test/transform/resource/after-ecj/StaticConstructor.java @@ -0,0 +1,11 @@ +import lombok.AllArgsConstructor; +public @AllArgsConstructor(staticName = "of") class StaticConstructor { + String name; + private @java.lang.SuppressWarnings("all") StaticConstructor(final String name) { + super(); + this.name = name; + } + public static @org.checkerframework.checker.nullness.qual.NonNull @java.lang.SuppressWarnings("all") StaticConstructor of(final String name) { + return new StaticConstructor(name); + } +}
\ No newline at end of file diff --git a/test/transform/resource/after-ecj/WithPlain.java b/test/transform/resource/after-ecj/WithPlain.java index 4203f540..66a1455b 100644 --- a/test/transform/resource/after-ecj/WithPlain.java +++ b/test/transform/resource/after-ecj/WithPlain.java @@ -7,10 +7,10 @@ class WithPlain { this.i = i; this.foo = foo; } - public @java.lang.SuppressWarnings("all") WithPlain withI(final int i) { + public @org.springframework.lang.NonNull @java.lang.SuppressWarnings("all") WithPlain withI(final int i) { return ((this.i == i) ? this : new WithPlain(i, this.foo)); } - public @java.lang.SuppressWarnings("all") WithPlain withFoo(final int foo) { + public @org.springframework.lang.NonNull @java.lang.SuppressWarnings("all") WithPlain withFoo(final int foo) { return ((this.foo == foo) ? this : new WithPlain(this.i, foo)); } } |