void () { JFunction1<String> constructorWithoutParams = Test::testOverloads; constructorWithoutParams.foo(); MethodReferenceHelperClass.<String>staticFun1(Test::testOverloads); h.<String>memberFun1(Test::testOverloads); JFunction2<Integer, String> constructorWithParam = Test::testOverloads; constructorWithParam.foo(2); MethodReferenceHelperClass.<Integer, String>staticFun2(Test::testOverloads); h.<Integer, String>memberFun2(Test::testOverloads); }