class Test { { Bar bar = Test::length; bar._(""); } public static Integer length(String s) { return s.length(); } interface Bar { Integer _(String s); } }