class MyTest { interface I { String m(Foo f); } static class Foo { String foo() { return null; } Foo getFoo() { return this; } static void test() { I i1 = Foo.getFoo()::foo; I i2 = this::foo; I i3 = Foo :: foo; } } }