String (PsiExpression expression, PsiPrimitiveType unboxedType, CommentTracker commentTracker) { final String constantText = computeConstantBooleanText(expression); if (constantText != null) { return constantText; } final String expressionText = getExpressionText(expression, new StringBuilder()).toString(); final String boxMethodName = s_unboxingMethods.get(unboxedType.getCanonicalText()); if (expression instanceof PsiMethodCallExpression methodCallExpression) { if (isValueOfCall(methodCallExpression)) { final PsiExpressionList argumentList = methodCallExpression.getArgumentList(); final PsiExpression[] arguments = argumentList.getExpressions(); final PsiExpression argument = commentTracker.markUnchanged(arguments[0]); return argument.getText(); } } commentTracker.markUnchanged(expression); final PsiType type = expression.getType(); if (type != null && type.equalsToText(CommonClassNames.JAVA_LANG_OBJECT)) { return "((" + unboxedType.getBoxedTypeName() + ')' + expressionText + ")." + boxMethodName + "()"; } return PsiPrecedenceUtil.getPrecedence(expression) > PsiPrecedenceUtil.METHOD_CALL_PRECEDENCE ? '(' + expressionText + ")." + boxMethodName + "()" : expressionText + '.' + boxMethodName + "()"; }