diff options
author | Roel Spilker <r.spilker@gmail.com> | 2015-12-18 20:17:47 +0100 |
---|---|---|
committer | Roel Spilker <r.spilker@gmail.com> | 2015-12-18 20:17:47 +0100 |
commit | 34a6fd644f6036bef5c2d94d925b6cf8e20ab17d (patch) | |
tree | ea2fb595c6fa804ed1b5c87541536687c29a2a63 /test | |
parent | d3c79494a32d439b6a936d24c8440e893fc2cb50 (diff) | |
download | lombok-34a6fd644f6036bef5c2d94d925b6cf8e20ab17d.tar.gz lombok-34a6fd644f6036bef5c2d94d925b6cf8e20ab17d.tar.bz2 lombok-34a6fd644f6036bef5c2d94d925b6cf8e20ab17d.zip |
fix issue #932: `@Delegate` would not generate varargs on javac
Diffstat (limited to 'test')
3 files changed, 66 insertions, 0 deletions
diff --git a/test/transform/resource/after-delombok/DelegateWithVarargs.java b/test/transform/resource/after-delombok/DelegateWithVarargs.java new file mode 100644 index 00000000..1d240524 --- /dev/null +++ b/test/transform/resource/after-delombok/DelegateWithVarargs.java @@ -0,0 +1,29 @@ +class DelegateWithVarargs { + private Bar bar; + private interface Bar { + void justOneParameter(int... varargs); + void multipleParameters(String first, int... varargs); + void array(int[] array); + void arrayVarargs(int[]... arrayVarargs); + } + @java.lang.SuppressWarnings("all") + @javax.annotation.Generated("lombok") + public void justOneParameter(final int... varargs) { + this.bar.justOneParameter(varargs); + } + @java.lang.SuppressWarnings("all") + @javax.annotation.Generated("lombok") + public void multipleParameters(final java.lang.String first, final int... varargs) { + this.bar.multipleParameters(first, varargs); + } + @java.lang.SuppressWarnings("all") + @javax.annotation.Generated("lombok") + public void array(final int[] array) { + this.bar.array(array); + } + @java.lang.SuppressWarnings("all") + @javax.annotation.Generated("lombok") + public void arrayVarargs(final int[]... arrayVarargs) { + this.bar.arrayVarargs(arrayVarargs); + } +} diff --git a/test/transform/resource/after-ecj/DelegateWithVarargs.java b/test/transform/resource/after-ecj/DelegateWithVarargs.java new file mode 100644 index 00000000..a0b5b7b5 --- /dev/null +++ b/test/transform/resource/after-ecj/DelegateWithVarargs.java @@ -0,0 +1,25 @@ +import lombok.experimental.Delegate; +class DelegateWithVarargs { + private interface Bar { + void justOneParameter(int... varargs); + void multipleParameters(String first, int... varargs); + void array(int[] array); + void arrayVarargs(int[]... arrayVarargs); + } + private @Delegate Bar bar; + DelegateWithVarargs() { + super(); + } + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void array(final int[] array) { + this.bar.array(array); + } + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void arrayVarargs(final int[]... arrayVarargs) { + this.bar.arrayVarargs(arrayVarargs); + } + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void justOneParameter(final int... varargs) { + this.bar.justOneParameter(varargs); + } + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void multipleParameters(final java.lang.String first, final int... varargs) { + this.bar.multipleParameters(first, varargs); + } +} diff --git a/test/transform/resource/before/DelegateWithVarargs.java b/test/transform/resource/before/DelegateWithVarargs.java new file mode 100644 index 00000000..0c266620 --- /dev/null +++ b/test/transform/resource/before/DelegateWithVarargs.java @@ -0,0 +1,12 @@ +import lombok.experimental.Delegate; + +class DelegateWithVarargs { + @Delegate private Bar bar; + + private interface Bar { + void justOneParameter(int... varargs); + void multipleParameters(String first, int... varargs); + void array(int[] array); + void arrayVarargs(int[]... arrayVarargs); + } +}
\ No newline at end of file |