public static @Nullable PsiMethod findValueOfMethod(final @NotNull PsiType psiType) {
    final PsiClass psiClass = PsiUtil.resolveClassInClassTypeOnly(psiType);
    return psiClass != null ? findValueOfMethod(psiClass) : null;
  }
public static @Nullable PsiMethod findValueOfMethod(final @NotNull PsiType psiType)