diff options
author | Rawi01 <Rawi01@users.noreply.github.com> | 2023-01-07 10:10:33 +0100 |
---|---|---|
committer | Rawi01 <Rawi01@users.noreply.github.com> | 2023-01-07 10:10:33 +0100 |
commit | f13b4dbbfccfe5a6bb72906c84c2e640e05d7788 (patch) | |
tree | 72f59210e43e960e93644b7485be3a90aec266b2 /test/transform/resource/after-delombok/BuilderDefaultsArray.java | |
parent | 731bb185077918af8bc1e6a9e6bb538b2d3fbbd8 (diff) | |
download | lombok-f13b4dbbfccfe5a6bb72906c84c2e640e05d7788.tar.gz lombok-f13b4dbbfccfe5a6bb72906c84c2e640e05d7788.tar.bz2 lombok-f13b4dbbfccfe5a6bb72906c84c2e640e05d7788.zip |
[fixes #3306] Convert short array initializers to long version
Diffstat (limited to 'test/transform/resource/after-delombok/BuilderDefaultsArray.java')
-rw-r--r-- | test/transform/resource/after-delombok/BuilderDefaultsArray.java | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/test/transform/resource/after-delombok/BuilderDefaultsArray.java b/test/transform/resource/after-delombok/BuilderDefaultsArray.java new file mode 100644 index 00000000..2dd6b304 --- /dev/null +++ b/test/transform/resource/after-delombok/BuilderDefaultsArray.java @@ -0,0 +1,79 @@ +import lombok.Value; + +public class BuilderDefaultsArray { + int[] x; + java.lang.String[][] y; + + @java.lang.SuppressWarnings("all") + private static int[] $default$x() { + return new int[] {1, 2}; + } + + @java.lang.SuppressWarnings("all") + private static java.lang.String[][] $default$y() { + return new java.lang.String[][] {}; + } + + @java.lang.SuppressWarnings("all") + BuilderDefaultsArray(final int[] x, final java.lang.String[][] y) { + this.x = x; + this.y = y; + } + + + @java.lang.SuppressWarnings("all") + public static class BuilderDefaultsArrayBuilder { + @java.lang.SuppressWarnings("all") + private boolean x$set; + @java.lang.SuppressWarnings("all") + private int[] x$value; + @java.lang.SuppressWarnings("all") + private boolean y$set; + @java.lang.SuppressWarnings("all") + private java.lang.String[][] y$value; + + @java.lang.SuppressWarnings("all") + BuilderDefaultsArrayBuilder() { + } + + /** + * @return {@code this}. + */ + @java.lang.SuppressWarnings("all") + public BuilderDefaultsArray.BuilderDefaultsArrayBuilder x(final int[] x) { + this.x$value = x; + x$set = true; + return this; + } + + /** + * @return {@code this}. + */ + @java.lang.SuppressWarnings("all") + public BuilderDefaultsArray.BuilderDefaultsArrayBuilder y(final java.lang.String[][] y) { + this.y$value = y; + y$set = true; + return this; + } + + @java.lang.SuppressWarnings("all") + public BuilderDefaultsArray build() { + int[] x$value = this.x$value; + if (!this.x$set) x$value = BuilderDefaultsArray.$default$x(); + java.lang.String[][] y$value = this.y$value; + if (!this.y$set) y$value = BuilderDefaultsArray.$default$y(); + return new BuilderDefaultsArray(x$value, y$value); + } + + @java.lang.Override + @java.lang.SuppressWarnings("all") + public java.lang.String toString() { + return "BuilderDefaultsArray.BuilderDefaultsArrayBuilder(x$value=" + java.util.Arrays.toString(this.x$value) + ", y$value=" + java.util.Arrays.deepToString(this.y$value) + ")"; + } + } + + @java.lang.SuppressWarnings("all") + public static BuilderDefaultsArray.BuilderDefaultsArrayBuilder builder() { + return new BuilderDefaultsArray.BuilderDefaultsArrayBuilder(); + } +} |