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