@NotNull
  public static List<PsiMethod> getAllMethods(Collection<? extends PsiClass> classes) {
    List<PsiMethod> allMethods = new ArrayList<>();
    HashSet<PsiClass> visited = new HashSet<>();

    for (PsiClass psiClass : classes) {
      getAllMethodsInner(psiClass, allMethods, visited);
    }

    return allMethods;
  }
@NotNull
  public static List<PsiMethod> getAllMethods(Collection<? extends PsiClass> classes)