if (stateObject.isDecorated()) {
toText(stateObject);
}
else {
ConstructorExpression expression = stateObject.getExpression();
// 'NEW'
appendIdentifier((expression != null) ? expression.getActualIdentifier() : NEW, NEW);
if (shouldOutput(expression) || expression.hasSpaceAfterNew()) {
writer.append(SPACE);
}
// Class name
writer.append(stateObject.getClassName());
// '('
if (shouldOutput(expression) || expression.hasLeftParenthesis()) {
writer.append(LEFT_PARENTHESIS);
}
toStringChildren(stateObject, true);
// ')'
if (shouldOutput(expression) || expression.hasRightParenthesis()) {
writer.append(RIGHT_PARENTHESIS);
}
}
}