void (@NotNull PsiMethod method, @NotNull List<? super PsiMethod> result) { PsiMethod[] superMethods = method.findSuperMethods(); for (PsiMethod superMethod : superMethods) { result.add(superMethod); collectSuperMethods(superMethod, result); } }