Yours Function<Foo, String> func2 = Foo::setBar;is a compilation error, because public void setBar(String bar)it is not a function from Footo String, it is actually a function from Stringto Void.
If you want to send the installer as a reference to a method, you need BiConsumer, taking Fooand Stringhow
final BiConsumer<Foo, String> setter = Foo::setBar;
, Foo, Consumer,
Foo foo = new Foo();
final Consumer<String> setBar = foo::setBar;