diff options
Diffstat (limited to 'test/transform/resource/before/ValDelegateMethodReference.java')
-rw-r--r-- | test/transform/resource/before/ValDelegateMethodReference.java | 35 |
1 files changed, 35 insertions, 0 deletions
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 |