void () { JFunction0 constructorSameClass = Java8Class::new; constructorSameClass.foo(); MethodReferenceHelperClass.staticFun0(Java8Class::new); h.memberFun0(Java8Class::new); JFunction0 qualifiedConstructorSameClass = test.Java8Class::new; qualifiedConstructorSameClass.foo(); MethodReferenceHelperClass.staticFun0(test.Java8Class::new); h.memberFun0(test.Java8Class::new); JFunction0 constructorAnotherClass = Test::new; constructorAnotherClass.foo(); MethodReferenceHelperClass.staticFun0(Test::new); h.memberFun0(Test::new); JFunction2<Integer, Test> constructorAnotherClassWithParam = Test::new; constructorAnotherClassWithParam.foo(1); MethodReferenceHelperClass.<Integer, Test>staticFun2(Test::new); h.<Integer, Test>memberFun2(Test::new); JFunction0 qualifiedConstructorAnotherClass = test.Test::new; qualifiedConstructorAnotherClass.foo(); MethodReferenceHelperClass.staticFun0(test.Test::new); h.memberFun0(test.Test::new); JFunction0 constructorAnotherClassWithoutConstructor = Test2::new; constructorAnotherClassWithoutConstructor.foo(); MethodReferenceHelperClass.staticFun0(Test2::new); h.memberFun0(Test2::new); }