Iterator<JvmElement> (@NotNull PsiElement declaringElement, @NotNull Collection<? extends JvmDeclarationSearcher> searchers) { return new FlatteningIterator<JvmDeclarationSearcher, JvmElement>(searchers.iterator()) { @Override public boolean hasNext() { ProgressManager.checkCanceled(); return super.hasNext(); } @Override protected Iterator<JvmElement> createValueIterator(JvmDeclarationSearcher searcher) { return searcher.findDeclarations(declaringElement).iterator(); } }; }