public static boolean hasBuilder(final @NotNull PsiClass psiClass) {
    return CachedValuesManager.getCachedValue(psiClass, () -> {
      final Project project = psiClass.getProject();
      final PsiClass builderClass = JavaPsiFacade.getInstance(project).findClass(JavaFxCommonNames.JAVAFX_FXML_BUILDER,
                                                                                 GlobalSearchScope.allScope(project));
      if (builderClass != null) {
        final PsiMethod[] buildMethods = builderClass.findMethodsByName("build", false);
        if (buildMethods.length == 1 && buildMethods[0].getParameterList().isEmpty()) {
          if (ClassInheritorsSearch.search(builderClass).forEach(aClass -> {
            PsiType returnType = null;
            final PsiMethod method = MethodSignatureUtil.findMethodBySuperMethod(aClass, buildMethods[0], false);
            if (method != null) {
              returnType = method.getReturnType();
            }
            return !Comparing.equal(psiClass, PsiUtil.resolveClassInClassTypeOnly(returnType));
          })) {
            return CachedValueProvider.Result.create(false, PsiModificationTracker.MODIFICATION_COUNT);
          }
        }
      }
      return CachedValueProvider.Result.create(true, PsiModificationTracker.MODIFICATION_COUNT);
    });
  }
public static boolean hasBuilder(final @NotNull PsiClass psiClass)