private static @Nullable PsiLiteralExpression getTargetLiteral(@NotNull PsiElement element) {
      if (element instanceof PsiLiteralExpression) {
        return (PsiLiteralExpression)element;
      }
      if (element instanceof PsiMethodCallExpression call) {
        final PsiMethod method = call.resolveMethod();
        final PsiExpression returnValue = PropertyUtilBase.getGetterReturnExpression(method);
        if (returnValue != null) {
          return ObjectUtils.tryCast(returnValue, PsiLiteralExpression.class);
        }
      }
      if (element instanceof PsiReferenceExpression referenceExpression) {
        final PsiVariable variable = ObjectUtils.tryCast(referenceExpression.resolve(), PsiVariable.class);
        if (variable == null) return null;
        if (variable.hasModifierProperty(PsiModifier.FINAL)) {
          return ObjectUtils.tryCast(variable.getInitializer(), PsiLiteralExpression.class);
        }
      }
      return null;
    }
private static @Nullable PsiLiteralExpression getTargetLiteral(@NotNull PsiElement element)