diff options
author | Rawi01 <Rawi01@users.noreply.github.com> | 2022-01-31 22:17:10 +0100 |
---|---|---|
committer | Roel Spilker <r.spilker@gmail.com> | 2022-01-31 23:22:15 +0100 |
commit | 8a914b1bf0eaa13178e719431add47b78d4e7277 (patch) | |
tree | fea869022e46c43d3856aae1d942cee87eeaa7e3 /test/transform/resource/after-delombok/ConstructorsWithSuperBuilderDefaults.java | |
parent | 1ba5fe86aa21f0e3fbbabeb6e91152e89bfee2d5 (diff) | |
download | lombok-8a914b1bf0eaa13178e719431add47b78d4e7277.tar.gz lombok-8a914b1bf0eaa13178e719431add47b78d4e7277.tar.bz2 lombok-8a914b1bf0eaa13178e719431add47b78d4e7277.zip |
[fixes #3053] Delay default annotation removal
Diffstat (limited to 'test/transform/resource/after-delombok/ConstructorsWithSuperBuilderDefaults.java')
-rw-r--r-- | test/transform/resource/after-delombok/ConstructorsWithSuperBuilderDefaults.java | 94 |
1 files changed, 94 insertions, 0 deletions
diff --git a/test/transform/resource/after-delombok/ConstructorsWithSuperBuilderDefaults.java b/test/transform/resource/after-delombok/ConstructorsWithSuperBuilderDefaults.java new file mode 100644 index 00000000..e7811dd5 --- /dev/null +++ b/test/transform/resource/after-delombok/ConstructorsWithSuperBuilderDefaults.java @@ -0,0 +1,94 @@ +class ConstructorsWithSuperBuilderDefaults { + int x; + int y; + + @java.lang.SuppressWarnings("all") + private static int $default$x() { + return 5; + } + + + @java.lang.SuppressWarnings("all") + public static abstract class ConstructorsWithSuperBuilderDefaultsBuilder<C extends ConstructorsWithSuperBuilderDefaults, B extends ConstructorsWithSuperBuilderDefaults.ConstructorsWithSuperBuilderDefaultsBuilder<C, B>> { + @java.lang.SuppressWarnings("all") + private boolean x$set; + @java.lang.SuppressWarnings("all") + private int x$value; + @java.lang.SuppressWarnings("all") + private int y; + + @java.lang.SuppressWarnings("all") + protected abstract B self(); + + @java.lang.SuppressWarnings("all") + public abstract C build(); + + /** + * @return {@code this}. + */ + @java.lang.SuppressWarnings("all") + public B x(final int x) { + this.x$value = x; + x$set = true; + return self(); + } + + /** + * @return {@code this}. + */ + @java.lang.SuppressWarnings("all") + public B y(final int y) { + this.y = y; + return self(); + } + + @java.lang.Override + @java.lang.SuppressWarnings("all") + public java.lang.String toString() { + return "ConstructorsWithSuperBuilderDefaults.ConstructorsWithSuperBuilderDefaultsBuilder(x$value=" + this.x$value + ", y=" + this.y + ")"; + } + } + + + @java.lang.SuppressWarnings("all") + private static final class ConstructorsWithSuperBuilderDefaultsBuilderImpl extends ConstructorsWithSuperBuilderDefaults.ConstructorsWithSuperBuilderDefaultsBuilder<ConstructorsWithSuperBuilderDefaults, ConstructorsWithSuperBuilderDefaults.ConstructorsWithSuperBuilderDefaultsBuilderImpl> { + @java.lang.SuppressWarnings("all") + private ConstructorsWithSuperBuilderDefaultsBuilderImpl() { + } + + @java.lang.Override + @java.lang.SuppressWarnings("all") + protected ConstructorsWithSuperBuilderDefaults.ConstructorsWithSuperBuilderDefaultsBuilderImpl self() { + return this; + } + + @java.lang.Override + @java.lang.SuppressWarnings("all") + public ConstructorsWithSuperBuilderDefaults build() { + return new ConstructorsWithSuperBuilderDefaults(this); + } + } + + @java.lang.SuppressWarnings("all") + protected ConstructorsWithSuperBuilderDefaults(final ConstructorsWithSuperBuilderDefaults.ConstructorsWithSuperBuilderDefaultsBuilder<?, ?> b) { + if (b.x$set) this.x = b.x$value; + else this.x = ConstructorsWithSuperBuilderDefaults.$default$x(); + this.y = b.y; + } + + @java.lang.SuppressWarnings("all") + public static ConstructorsWithSuperBuilderDefaults.ConstructorsWithSuperBuilderDefaultsBuilder<?, ?> builder() { + return new ConstructorsWithSuperBuilderDefaults.ConstructorsWithSuperBuilderDefaultsBuilderImpl(); + } + + @java.lang.SuppressWarnings("all") + public ConstructorsWithSuperBuilderDefaults() { + this.x = ConstructorsWithSuperBuilderDefaults.$default$x(); + } + + @java.lang.SuppressWarnings("all") + public ConstructorsWithSuperBuilderDefaults(final int x, final int y) { + this.x = x; + this.y = y; + } +}
\ No newline at end of file |