From ce0a09177e577c0b4f42379c5cc7ce364f26c905 Mon Sep 17 00:00:00 2001 From: Bulgakov Alexander Date: Fri, 26 Apr 2019 22:10:34 +0300 Subject: #1976. A handlers' order has been changed. The javac's HandleDelegate generates code before the HandleVal. --- .../after-delombok/ValDelegateMethodReference.java | 65 ++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 test/transform/resource/after-delombok/ValDelegateMethodReference.java (limited to 'test/transform/resource/after-delombok/ValDelegateMethodReference.java') 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 column = createColumn(Entity::getValue); + } + + private Column createColumn(Function func) { + return new Column<>(func); + } +} + +class Column { + public Column(Function 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 -- cgit