private static void traversePackage(PsiPackage psiPackage, Consumer<? super PsiClass> classConsumer) {
    for (PsiPackage aPackage : psiPackage.getSubPackages()) {
      traversePackage(aPackage, classConsumer);
    }
    for (PsiClass psiClass : psiPackage.getClasses()) {
      classConsumer.consume(psiClass);
    }
  }
private static void traversePackage(PsiPackage psiPackage, Consumer<? super PsiClass> classConsumer)