public class ConditionalExpr extends ASTExpr
Modifier and Type | Class and Description |
---|---|
protected static class |
ConditionalExpr.ElseIfClauseData |
DEFAULT_ATTRIBUTE_NAME, DEFAULT_ATTRIBUTE_NAME_DEPRECATED, DEFAULT_INDEX_VARIABLE_NAME, DEFAULT_INDEX0_VARIABLE_NAME, DEFAULT_MAP_KEY_NAME, DEFAULT_MAP_VALUE_NAME, defaultOptionValues, EMPTY_OPTION, MAP_KEY_VALUE, MISSING, supportedOptions
enclosingTemplate, indentation
Constructor and Description |
---|
ConditionalExpr(StringTemplate enclosingTemplate,
antlr.collections.AST tree) |
Modifier and Type | Method and Description |
---|---|
void |
addElseIfSubtemplate(ASTExpr conditionalTree,
StringTemplate subtemplate) |
StringTemplate |
getElseSubtemplate() |
StringTemplate |
getSubtemplate() |
void |
setElseSubtemplate(StringTemplate elseSubtemplate) |
void |
setSubtemplate(StringTemplate subtemplate) |
int |
write(StringTemplate self,
StringTemplateWriter out)
To write out the value of a condition expr, invoke the evaluator in eval.g
to walk the condition tree computing the boolean value.
|
protected int |
writeSubTemplate(StringTemplate self,
StringTemplateWriter out,
StringTemplate subtemplate) |
accessField, add, applyListOfAlternatingTemplates, applyTemplateToListOfAttributes, convertAnythingIteratableToIterator, convertAnythingToIterator, convertArrayToList, evaluateArguments, evaluateExpression, first, getAST, getMethod, getObjectProperty, getOption, getTemplateInclude, handleExprOptions, invokeMethod, last, length, rawGetObjectProperty, rest, setSoleFormalArgumentToIthValue, strip, testAttributeTrue, toString, trunc, write, writeAttribute, writeIterableValue, writePOJO, writeTemplate
getEnclosingTemplate, getIndentation, setIndentation
public ConditionalExpr(StringTemplate enclosingTemplate, antlr.collections.AST tree)
public void setSubtemplate(StringTemplate subtemplate)
public void addElseIfSubtemplate(ASTExpr conditionalTree, StringTemplate subtemplate)
public StringTemplate getSubtemplate()
public StringTemplate getElseSubtemplate()
public void setElseSubtemplate(StringTemplate elseSubtemplate)
public int write(StringTemplate self, StringTemplateWriter out) throws java.io.IOException
protected int writeSubTemplate(StringTemplate self, StringTemplateWriter out, StringTemplate subtemplate) throws java.io.IOException
java.io.IOException
Copyright ? 2006-2017 Terence Parr