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