Iterable<PsiMethod> (@NotNull PsiMethod method, OverridingMethodsSearch.SearchParameters parameters, @NotNull Project project) { final PsiClass containingClass = ReadAction.compute(method::getContainingClass); assert containingClass != null; Collection<PsiMethod> result = new HashSet<>(); Processor<PsiClass> inheritorsProcessor = inheritor -> { PsiMethod found = ReadAction.compute(() -> findOverridingMethod(inheritor, method, containingClass)); if (found != null) { synchronized (result) { result.add(found); } } return true; }; // use wider scope to handle public method defined in package-private class which is subclassed by public class in the same package which is subclassed by public class from another package with redefined method SearchScope allScope = GlobalSearchScope.allScope(project); boolean success = ClassInheritorsSearch.search(new ClassInheritanceSearchFromJavaOverridingMethodsParameters(containingClass, allScope, parameters)) .allowParallelProcessing().forEach(inheritorsProcessor); assert success; return result; }