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
final class TemplateEngine.NestedExpression extends TemplateEngine.JexlBasedExpression
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, node
-
Fields inherited from class org.apache.commons.jexl3.internal.TemplateEngine.TemplateExpression
source
-
-
Constructor Summary
Constructors Constructor Description NestedExpression(java.lang.CharSequence expr, JexlNode node, TemplateEngine.TemplateExpression source)
Creates a nested unified expression.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringBuilder
asString(java.lang.StringBuilder strb)
Adds this expression's string representation to a StringBuilder.protected java.lang.Object
evaluate(Interpreter interpreter)
Interprets a sub-expression.(package private) TemplateEngine.ExpressionType
getType()
Gets this TemplateExpression type.boolean
isImmediate()
Checks whether this expression is immediate.protected TemplateEngine.TemplateExpression
prepare(Interpreter interpreter)
Prepares a sub-expression for interpretation.-
Methods inherited from class org.apache.commons.jexl3.internal.TemplateEngine.JexlBasedExpression
getInfo, getVariables, getVariables, options
-
Methods inherited from class org.apache.commons.jexl3.internal.TemplateEngine.TemplateExpression
asString, evaluate, evaluate, getSource, isDeferred, prepare, prepare, toString
-
-
-
-
Constructor Detail
-
NestedExpression
NestedExpression(java.lang.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 Detail
-
asString
public java.lang.StringBuilder asString(java.lang.StringBuilder strb)
Description copied from interface:JxltEngine.Expression
Adds this expression's string representation to a StringBuilder.- Specified by:
asString
in interfaceJxltEngine.Expression
- Overrides:
asString
in classTemplateEngine.JexlBasedExpression
- Parameters:
strb
- the builder to fill- Returns:
- the builder argument
-
evaluate
protected java.lang.Object evaluate(Interpreter interpreter)
Description copied from class:TemplateEngine.TemplateExpression
Interprets a sub-expression.- Overrides:
evaluate
in classTemplateEngine.JexlBasedExpression
- Parameters:
interpreter
- a JEXL interpreter- Returns:
- the result of interpretation
-
getType
TemplateEngine.ExpressionType getType()
Description copied from class:TemplateEngine.TemplateExpression
Gets this TemplateExpression type.- Specified by:
getType
in classTemplateEngine.TemplateExpression
- Returns:
- its type
-
isImmediate
public boolean isImmediate()
Description copied from interface:JxltEngine.Expression
Checks whether this expression is immediate.- Specified by:
isImmediate
in interfaceJxltEngine.Expression
- Overrides:
isImmediate
in classTemplateEngine.TemplateExpression
- Returns:
- true if immediate, false otherwise
-
prepare
protected TemplateEngine.TemplateExpression prepare(Interpreter interpreter)
Description copied from class:TemplateEngine.TemplateExpression
Prepares a sub-expression for interpretation.- Overrides:
prepare
in classTemplateEngine.TemplateExpression
- Parameters:
interpreter
- a JEXL interpreter- Returns:
- a prepared unified expression
-
-