void (PsiClass anInterface, final Set<? super PsiClass> visited, final Collection<? super PsiClass> result) { LOG.assertTrue(anInterface.isInterface()); visited.add(anInterface); ClassInheritorsSearch.search(anInterface, false).forEach(new PsiElementProcessorAdapter<>(new PsiElementProcessor<>() { @Override public boolean execute(@NotNull PsiClass aClass) { if (!aClass.isInterface()) { result.add(aClass); } else if (!visited.contains(aClass)) { _findImplementingClasses(aClass, visited, result); } return true; } })); }