private static @NotNull Iterator<JvmElement> iterateDeclarations(@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();
      }
    };
  }
private static @NotNull Iterator<JvmElement> iterateDeclarations(@NotNull PsiElement declaringElement,
                                                                   @NotNull Collection<? extends JvmDeclarationSearcher> searchers)