class Test { void test(Helper helper) { staticFactory(helper, Integer[]::new); } void staticFactory(Helper helper, IntFunction generator){} class Helper {} interface IntFunction { R apply(int value); } }