interface Interf {} class SomeClass { static > Class someMethod(I i) { return null; } } interface OtherInterf {} interface ImmutableSet {} class SomeOtherClass { static ImmutableSet>> someOtherMethod() { return (ImmutableSet>>)aux(OtherInterf.class); } static ImmutableSet> aux(Class t) { return null; } }