aboutsummaryrefslogtreecommitdiff
path: root/test/pretty/resource/after
diff options
context:
space:
mode:
authorRoel Spilker <r.spilker@gmail.com>2014-05-01 21:42:38 +0200
committerRoel Spilker <r.spilker@gmail.com>2014-05-01 21:42:38 +0200
commitc7bfba873eb62a73668875cb1e9d94fb322bec1c (patch)
tree73de1bf40ab4769ec17a5caed2d5949424567266 /test/pretty/resource/after
parent81ba6ee5f5668f4634253f7446de9c93190455b0 (diff)
downloadlombok-c7bfba873eb62a73668875cb1e9d94fb322bec1c.tar.gz
lombok-c7bfba873eb62a73668875cb1e9d94fb322bec1c.tar.bz2
lombok-c7bfba873eb62a73668875cb1e9d94fb322bec1c.zip
[java8] Support in delombok for method references.
Diffstat (limited to 'test/pretty/resource/after')
-rw-r--r--test/pretty/resource/after/MethodReference.java36
1 files changed, 36 insertions, 0 deletions
diff --git a/test/pretty/resource/after/MethodReference.java b/test/pretty/resource/after/MethodReference.java
new file mode 100644
index 00000000..115b7014
--- /dev/null
+++ b/test/pretty/resource/after/MethodReference.java
@@ -0,0 +1,36 @@
+class MethodReference {
+ public MethodReference() {
+ }
+ public <T> MethodReference(T in) {
+ }
+ public void simpleInstanceReference() {
+ Runnable r = this::foo;
+ }
+ public void simpleConstructorReference() {
+ Runnable r = MethodReference::new;
+ }
+ public void simpleStaticReference() {
+ Runnable r = MethodReference::staticFoo;
+ }
+ public void generifiedStaticReference() {
+ StringConverter sc = MethodReference::<String>generifiedStaticFoo;
+ }
+ public void generifiedConstructorReference() {
+ FooConverter<MethodReference> fc = MethodReference::<String>new;
+ }
+ public void foo() {
+ }
+ private static void staticFoo() {
+ }
+ public static <T> T generifiedStaticFoo(T foo) {
+ return foo;
+ }
+ @FunctionalInterface
+ public interface StringConverter {
+ String hello(String x);
+ }
+ @FunctionalInterface
+ public interface FooConverter<K> {
+ K hello(String x);
+ }
+} \ No newline at end of file