Iterable<OverloadDescriptor> (Utils utils, final JvmClass cls, Function<? super JvmMethod, JVMFlags> correspondenceFinder) { Function<JvmClass, Iterable<OverloadDescriptor>> mapper = c -> Iterators.filter(Iterators.map(c.getMethods(), m -> { JVMFlags accessScope = correspondenceFinder.apply(m); return accessScope != null? new OverloadDescriptor(accessScope, m, c.getReferenceID()) : null; }), Iterators.notNullFilter()); return Iterators.flat( Iterators.flat(Iterators.map(Iterators.recurse(cls, cl -> Iterators.flat(Iterators.map(cl.getSuperTypes(), st -> utils.getClassesByName(st))), true), cl -> mapper.apply(cl))), Iterators.flat(Iterators.map(utils.allSubclasses(cls.getReferenceID()), id -> Iterators.flat(Iterators.map(utils.getNodes(id, JvmClass.class), cl1 -> mapper.apply(cl1))))) ); }