Class TemplateEngine.NestedExpression
java.lang.Object
org.apache.commons.jexl3.internal.TemplateEngine.TemplateExpression
org.apache.commons.jexl3.internal.TemplateEngine.JexlBasedExpression
org.apache.commons.jexl3.internal.TemplateEngine.NestedExpression
- All Implemented Interfaces:
JxltEngine.Expression
- Enclosing class:
TemplateEngine
An immediate unified expression nested into a deferred unified expression.
#{...${jexl}...}
Note that the deferred syntax is JEXL's.
-
Field Summary
Fields inherited from class org.apache.commons.jexl3.internal.TemplateEngine.JexlBasedExpression
expr, nodeFields inherited from class org.apache.commons.jexl3.internal.TemplateEngine.TemplateExpression
source -
Constructor Summary
ConstructorsConstructorDescriptionNestedExpression(CharSequence expr, JexlNode node, TemplateEngine.TemplateExpression source) Creates a nested unified expression. -
Method Summary
Modifier and TypeMethodDescriptionasString(StringBuilder strb) Adds this expression's string representation to a StringBuilder.protected Objectevaluate(Interpreter interpreter) Interprets a sub-expression.(package private) TemplateEngine.ExpressionTypegetType()Gets this TemplateExpression type.booleanChecks whether this expression is immediate.protected TemplateEngine.TemplateExpressionprepare(Interpreter interpreter) Prepares a sub-expression for interpretation.Methods inherited from class org.apache.commons.jexl3.internal.TemplateEngine.JexlBasedExpression
getInfo, getVariables, getVariables, optionsMethods inherited from class org.apache.commons.jexl3.internal.TemplateEngine.TemplateExpression
asString, evaluate, evaluate, getSource, isDeferred, prepare, prepare, toString
-
Constructor Details
-
NestedExpression
NestedExpression(CharSequence expr, JexlNode node, TemplateEngine.TemplateExpression source) Creates a nested unified expression.- Parameters:
expr- the unified expression as a stringnode- the unified expression as an ASTsource- the source unified expression if any
-
-
Method Details
-
asString
Description copied from interface:JxltEngine.ExpressionAdds this expression's string representation to a StringBuilder.- Specified by:
asStringin interfaceJxltEngine.Expression- Overrides:
asStringin classTemplateEngine.JexlBasedExpression- Parameters:
strb- the builder to fill- Returns:
- the builder argument
-
evaluate
Description copied from class:TemplateEngine.TemplateExpressionInterprets a sub-expression.- Overrides:
evaluatein classTemplateEngine.JexlBasedExpression- Parameters:
interpreter- a JEXL interpreter- Returns:
- the result of interpretation
-
getType
TemplateEngine.ExpressionType getType()Description copied from class:TemplateEngine.TemplateExpressionGets this TemplateExpression type.- Specified by:
getTypein classTemplateEngine.TemplateExpression- Returns:
- its type
-
isImmediate
public boolean isImmediate()Description copied from interface:JxltEngine.ExpressionChecks whether this expression is immediate.- Specified by:
isImmediatein interfaceJxltEngine.Expression- Overrides:
isImmediatein classTemplateEngine.TemplateExpression- Returns:
- true if immediate, false otherwise
-
prepare
Description copied from class:TemplateEngine.TemplateExpressionPrepares a sub-expression for interpretation.- Overrides:
preparein classTemplateEngine.TemplateExpression- Parameters:
interpreter- a JEXL interpreter- Returns:
- a prepared unified expression
-