void (PsiFile psiFile, final Processor<? super PsiClass> consumer, final ClassInheritorsSearch.@NotNull SearchParameters parameters, @NotNull final PsiClass baseClass, final boolean[] success) { psiFile.accept(new JavaRecursiveElementVisitor() { @Override public void visitClass(@NotNull PsiClass candidate) { ProgressManager.checkCanceled(); if (!success[0]) return; if (candidate.isInheritor(baseClass, true) && checkCandidate(candidate, parameters) && !consumer.process(candidate)) { success[0] = false; return; } super.visitClass(candidate); } }); }