class Collection {} interface Bar {} class BarImpl implements Bar {} interface Foo { Collection getElements(); } class FooImpl implements Foo { public Collection getElements() { return null; } } public class Bazz { public static Collection getElements(Collection> foos) { return null; } public static void failure(final Collection foos) { getElements(foos); } }