List<PsiMethod> (Collection<? extends PsiClass> classes) { List<PsiMethod> allMethods = new ArrayList<>(); HashSet<PsiClass> visited = new HashSet<>(); for (PsiClass psiClass : classes) { getAllMethodsInner(psiClass, allMethods, visited); } return allMethods; }