class MyTest {
private static class Foo {
static int foo(int i) { return i; }
}
static Foo foo = new Foo();
static void foo(String s) {}
static void bar(Integer i, Number n) {}
static void bar(Number n, Integer i) {}
void baz(int i) {}
}
class AlienTest {
interface IInt {
int m(int i);
}
interface IIntInt {
int m(Integer i1, Integer i2);
}
static {
IInt i1 = MyTest::abracadabra;
IInt i2 = MyTest::foo;
IInt i3 = MyTest::bar;
IIntInt i4 = MyTest::bar;
IInt i5 = MyTest::baz;
IInt i6 = MyTest.foo::foo;
IInt i7 = MyTest.Foo::foo;
}
}
class MyTest1 {
interface I1 {
int[] m();
}
interface I2 {
Object m();
}
interface I3 {
char[] m();
}
interface I4 {
boolean m();
}
interface I5 {
Class extends MyTest1> m();
}
interface I6 {
Class m();
}
void foo(Object[] arr) {
I1 c1 = arr :: clone;
I2 c2 = arr :: clone;
I3 c3 = arr::clone;
I4 c5 = arr::clone;
I5 c4 = this::getClass;
I6 c6 = this::getClass;
}
}