String (GrVariable variable, PsiType declaredType) { if (declaredType instanceof PsiPrimitiveType) { Object eval = GroovyConstantExpressionEvaluator.evaluate(variable.getInitializerGroovy()); if (eval instanceof Float || PsiTypes.floatType().equals(TypesUtil.unboxPrimitiveTypeWrapper(variable.getType())) && eval instanceof Number) { return eval.toString() + "f"; } else if (eval instanceof Character) { StringBuilder buffer = new StringBuilder(); buffer.append('\''); StringUtil.escapeStringCharacters(1, Character.toString(((Character)eval).charValue()), buffer); buffer.append('\''); return buffer.toString(); } if (eval instanceof Number || eval instanceof Boolean) { return eval.toString(); } } return GroovyToJavaGenerator.getDefaultValueText(declaredType.getCanonicalText()); }