// version 8: class MethodReference { public MethodReference() { } public 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::generifiedStaticFoo; } public void generifiedConstructorReference() { FooConverter fc = MethodReference::new; } public void foo() { } private static void staticFoo() { } public static T generifiedStaticFoo(T foo) { return foo; } @FunctionalInterface public interface StringConverter { public String hello(String x); } @FunctionalInterface public interface FooConverter { public K hello(String x); } }