public static @Nullable PsiMethod findValueOfMethod(final @NotNull PsiClass psiClass) {
    return CachedValuesManager.getCachedValue(psiClass, () -> {
      final PsiMethod[] methods = psiClass.findMethodsByName(JavaFxCommonNames.VALUE_OF, true);
      for (PsiMethod method : methods) {
        if (method.hasModifierProperty(PsiModifier.STATIC)) {
          final PsiParameter[] parameters = method.getParameterList().getParameters();
          if (parameters.length == 1) {
            final PsiType type = parameters[0].getType();
            if (type.equalsToText(CommonClassNames.JAVA_LANG_STRING) || type.equalsToText(CommonClassNames.JAVA_LANG_OBJECT)) {
              if (psiClass.equals(PsiUtil.resolveClassInType(method.getReturnType()))) {
                return CachedValueProvider.Result.create(method, PsiModificationTracker.MODIFICATION_COUNT);
              }
            }
          }
        }
      }
      return CachedValueProvider.Result.create(null, PsiModificationTracker.MODIFICATION_COUNT);
    });
  }
public static @Nullable PsiMethod findValueOfMethod(final @NotNull PsiClass psiClass)