diff options
author | Reinier Zwitserloot <r.zwitserloot@projectlombok.org> | 2019-04-30 22:35:30 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-30 22:35:30 +0200 |
commit | bfbf7f87960034eb51dd776251ac5895dffea071 (patch) | |
tree | f76144c3bb21eb84611a619f6de0d8b3d6ef9f7f /test/transform/resource | |
parent | 00dd02ca916a6729bfb66ddf8d3034a274079634 (diff) | |
parent | ce0a09177e577c0b4f42379c5cc7ce364f26c905 (diff) | |
download | lombok-bfbf7f87960034eb51dd776251ac5895dffea071.tar.gz lombok-bfbf7f87960034eb51dd776251ac5895dffea071.tar.bz2 lombok-bfbf7f87960034eb51dd776251ac5895dffea071.zip |
Merge pull request #2114 from bulgakovalexander/bugfix/#1976
#1976. A handlers' order has been changed.
Diffstat (limited to 'test/transform/resource')
3 files changed, 158 insertions, 0 deletions
diff --git a/test/transform/resource/after-delombok/ValDelegateMethodReference.java b/test/transform/resource/after-delombok/ValDelegateMethodReference.java new file mode 100644 index 00000000..186e2aaa --- /dev/null +++ b/test/transform/resource/after-delombok/ValDelegateMethodReference.java @@ -0,0 +1,65 @@ +import java.util.function.Function; + +public class ValDelegateMethodReference { + public void config() { + final Column<Entity, java.lang.String> column = createColumn(Entity::getValue); + } + + private <V> Column<Entity, V> createColumn(Function<Entity, V> func) { + return new Column<>(func); + } +} + +class Column<T, V> { + public Column(Function<T, V> vp) { + } +} + +class Entity { + private MyDelegate innerDelegate; + + @java.lang.SuppressWarnings("all") + public java.lang.String getValue() { + return this.innerDelegate.getValue(); + } + + @java.lang.SuppressWarnings("all") + public java.lang.Boolean getABoolean() { + return this.innerDelegate.getABoolean(); + } + + @java.lang.SuppressWarnings("all") + public void setValue(final java.lang.String value) { + this.innerDelegate.setValue(value); + } + + @java.lang.SuppressWarnings("all") + public void setABoolean(final java.lang.Boolean aBoolean) { + this.innerDelegate.setABoolean(aBoolean); + } +} + +class MyDelegate { + private String value; + private Boolean aBoolean; + + @java.lang.SuppressWarnings("all") + public String getValue() { + return this.value; + } + + @java.lang.SuppressWarnings("all") + public Boolean getABoolean() { + return this.aBoolean; + } + + @java.lang.SuppressWarnings("all") + public void setValue(final String value) { + this.value = value; + } + + @java.lang.SuppressWarnings("all") + public void setABoolean(final Boolean aBoolean) { + this.aBoolean = aBoolean; + } +}
\ No newline at end of file diff --git a/test/transform/resource/after-ecj/ValDelegateMethodReference.java b/test/transform/resource/after-ecj/ValDelegateMethodReference.java new file mode 100644 index 00000000..cfd0dab2 --- /dev/null +++ b/test/transform/resource/after-ecj/ValDelegateMethodReference.java @@ -0,0 +1,58 @@ +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Delegate; +import lombok.val; +import java.util.function.Function; +public class ValDelegateMethodReference { + public ValDelegateMethodReference() { + super(); + } + public void config() { + final @val Column<Entity, java.lang.String> column = createColumn(Entity::getValue); + } + private <V>Column<Entity, V> createColumn(Function<Entity, V> func) { + return new Column<>(func); + } +} +class Column<T, V> { + public Column(Function<T, V> vp) { + super(); + } +} +class Entity { + private @Delegate MyDelegate innerDelegate; + Entity() { + super(); + } + public @java.lang.SuppressWarnings("all") java.lang.Boolean getABoolean() { + return this.innerDelegate.getABoolean(); + } + public @java.lang.SuppressWarnings("all") java.lang.String getValue() { + return this.innerDelegate.getValue(); + } + public @java.lang.SuppressWarnings("all") void setABoolean(final java.lang.Boolean aBoolean) { + this.innerDelegate.setABoolean(aBoolean); + } + public @java.lang.SuppressWarnings("all") void setValue(final java.lang.String value) { + this.innerDelegate.setValue(value); + } +} +@Getter @Setter class MyDelegate { + private String value; + private Boolean aBoolean; + MyDelegate() { + super(); + } + public @java.lang.SuppressWarnings("all") String getValue() { + return this.value; + } + public @java.lang.SuppressWarnings("all") Boolean getABoolean() { + return this.aBoolean; + } + public @java.lang.SuppressWarnings("all") void setValue(final String value) { + this.value = value; + } + public @java.lang.SuppressWarnings("all") void setABoolean(final Boolean aBoolean) { + this.aBoolean = aBoolean; + } +} diff --git a/test/transform/resource/before/ValDelegateMethodReference.java b/test/transform/resource/before/ValDelegateMethodReference.java new file mode 100644 index 00000000..7adc402a --- /dev/null +++ b/test/transform/resource/before/ValDelegateMethodReference.java @@ -0,0 +1,35 @@ + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Delegate; +import lombok.val; + +import java.util.function.Function; + +public class ValDelegateMethodReference { + + public void config() { + val column = createColumn(Entity::getValue); + } + + private <V> Column<Entity, V> createColumn(Function<Entity, V> func) { + return new Column<>(func); + } + +} + +class Column<T, V> { + public Column(Function<T, V> vp) {} +} + +class Entity { + @Delegate + private MyDelegate innerDelegate; +} + +@Getter +@Setter +class MyDelegate { + private String value; + private Boolean aBoolean; +}
\ No newline at end of file |