interface Predicate<T> {} class Foo { static void process(Predicate predicate, C context) {} } interface I {} class Bar implements I { Predicate p; { Foo.process(p, new Bar()); } }