if (stateObject.isDecorated()) {
toText(stateObject);
}
else {
AbstractTripleEncapsulatedExpression expression = stateObject.getExpression();
// Identifier
appendIdentifier((expression != null) ? expression.getActualIdentifier() : stateObject.getIdentifier(), stateObject.getIdentifier());
// '('
if (shouldOutput(expression) || expression.hasLeftParenthesis()) {
writer.append(LEFT_PARENTHESIS);
}
// First expression
if (stateObject.hasFirst()) {
stateObject.getFirst().accept(this);
}
if (shouldOutput(expression) || expression.hasFirstComma()) {
writer.append(COMMA);
}
if (shouldOutput(expression) || expression.hasSpaceAfterFirstComma()) {
writer.append(SPACE);
}
// Second expression
if (stateObject.hasSecond()) {
stateObject.getSecond().accept(this);
}
// Third expression
if (stateObject.hasThird()) {
if (shouldOutput(expression) || expression.hasSecondComma()) {
writer.append(COMMA);
}
if (shouldOutput(expression) || expression.hasSpaceAfterSecondComma()) {
writer.append(SPACE);
}
stateObject.getThird().accept(this);
}
// ')'
if (shouldOutput(expression) || expression.hasRightParenthesis()) {
writer.append(RIGHT_PARENTHESIS);
}
}
}