public static @Nullable PsiMethod findMainMethodInClassOrParent(PsiClass aClass) {
    DumbService dumbService = DumbService.getInstance(aClass.getProject());
    try {
      return dumbService.computeWithAlternativeResolveEnabled((ThrowableComputable<PsiMethod, Throwable>)() -> {
        final PsiMethod[] mainMethods = aClass.findMethodsByName("main", true);
        return findMainMethod(mainMethods, aClass, false);
      });
    }
    catch (IndexNotReadyException e) {
      return null;
    }
  }
public static @Nullable PsiMethod findMainMethodInClassOrParent(PsiClass aClass)