private static boolean isUsedMainOrPremainMethod(@NotNull PsiMethod method) {
        if (!PsiClassImplUtil.isMainOrPremainMethod(method)) {
          return false;
        }
        //premain
        if (!"main".equals(method.getName())) {
          return true;
        }
        return !PsiUtil.isAvailable(JavaFeature.IMPLICIT_CLASSES, method);
      }
private static boolean isUsedMainOrPremainMethod(@NotNull PsiMethod method)