if (stateObject.isDecorated()) {
toText(stateObject);
}
else {
CollectionMemberDeclaration expression = stateObject.getExpression();
// 'IN'
appendIdentifier((expression != null) ? expression.getActualInIdentifier() : IN, IN);
// '('
if (!stateObject.isDerived() && (shouldOutput(expression) || expression.hasLeftParenthesis())) {
writer.append(LEFT_PARENTHESIS);
}
else if (stateObject.isDerived() && (shouldOutput(expression) || expression.hasSpaceAfterIn())) {
writer.append(SPACE);
}
// Collection-valued path expression
stateObject.getCollectionValuedPath().accept(this);
// ')'
if (!stateObject.isDerived() && (shouldOutput(expression) || expression.hasRightParenthesis())) {
writer.append(RIGHT_PARENTHESIS);
if (shouldOutput(expression) || expression.hasSpaceAfterRightParenthesis()) {
writer.append(SPACE);
}
}
else if (stateObject.isDerived() &&
stateObject.hasAs() &&
(shouldOutput(expression) || expression.hasSpaceAfterRightParenthesis())) {
writer.append(SPACE);
}
// 'AS'
if (stateObject.hasAs()) {
appendIdentifier((expression != null) ? expression.getActualAsIdentifier() : AS, AS);
if (shouldOutput(expression) || expression.hasSpaceAfterAs()) {
writer.append(SPACE);
}
}
// Identification variable