private static boolean hasMainMethodDeep(@NotNull PsiClass aClass) {
    if (PsiMethodUtil.hasMainMethod(aClass)) return true;
    for (PsiClass innerClass : aClass.getInnerClasses()) {
      if (innerClass.hasModifierProperty(PsiModifier.STATIC) && PsiMethodUtil.hasMainMethod(innerClass)) {
        return true;
      }
    }
    return false;
  }
private static boolean hasMainMethodDeep(@NotNull PsiClass aClass)