private ChoiceDefinitionRenderer() {
// Utility class, no public or protected default constructor
}
public static void render(StringBuilder buffer, ProcessorDefinition<?> processor) {
ChoiceDefinition choice = (ChoiceDefinition)processor;
buffer.append(".").append(choice.getShortName()).append("()");
for (WhenDefinition when : choice.getWhenClauses()) {
ProcessorDefinitionRenderer.render(buffer, when);
}
OtherwiseDefinition other = choice.getOtherwise();
if (other != null) {
ProcessorDefinitionRenderer.render(buffer, other);
}
buffer.append(".end()");
}