public boolean isStrictEntryPoint(@NotNull PsiElement element) {
    if (element instanceof PsiMethod && isAddMainsEnabled() && PsiClassImplUtil.isMainOrPremainMethod((PsiMethod)element)) {
      return true;
    }
    Project project = element.getProject();
    if (element instanceof PsiClass aClass) {
      JavaPsiFacade psiFacade = JavaPsiFacade.getInstance(project);
      if (isAddAppletEnabled()) {
        PsiClass applet = psiFacade.findClass("java.applet.Applet", GlobalSearchScope.allScope(project));
        if (applet != null && aClass.isInheritor(applet, true)) {
          return true;
        }
      }

      if (isAddServletEnabled()) {
        PsiClass servlet = psiFacade.findClass("javax.servlet.Servlet", GlobalSearchScope.allScope(project));
        if (servlet != null && aClass.isInheritor(servlet, true)) {
          return true;
        }
      }
      if (isAddMainsEnabled() && hasMainMethodDeep(aClass)) return true;
    }
    if (element instanceof PsiModifierListOwner) {
      EntryPointsManager entryPointsManager = EntryPointsManager.getInstance(project);
      if (entryPointsManager.isEntryPoint(element)) return true;
    }
    for (EntryPoint extension : getExtensions()) {
      if (extension.isSelected() && extension.isEntryPoint(element)) {
        return true;
      }
    }
    return false;
  }
public boolean isStrictEntryPoint(@NotNull PsiElement element)