private abstract class UnifiedJEXL.JexlBasedExpression extends UnifiedJEXL.Expression
Modifier and Type | Field and Description |
---|---|
protected java.lang.CharSequence |
expr
The JEXL string for this expression.
|
protected JexlNode |
node
The JEXL node for this expression.
|
source
Modifier | Constructor and Description |
---|---|
protected |
JexlBasedExpression(java.lang.CharSequence theExpr,
JexlNode theNode,
UnifiedJEXL.Expression theSource)
Creates a JEXL interpretable expression.
|
Modifier and Type | Method and 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)
Intreprets a sub-expression.
|
java.util.Set<java.util.List<java.lang.String>> |
getVariables()
Gets the list of variables accessed by this expression.
|
protected void |
getVariables(java.util.Set<java.util.List<java.lang.String>> refs)
Fills up the list of variables accessed by this expression.
|
asString, evaluate, getSource, getType, isDeferred, isImmediate, prepare, prepare, toString
protected final java.lang.CharSequence expr
protected final JexlNode node
protected JexlBasedExpression(java.lang.CharSequence theExpr, JexlNode theNode, UnifiedJEXL.Expression theSource)
theExpr
- the expression as a stringtheNode
- the expression as an ASTtheSource
- the source expression if anypublic java.lang.StringBuilder asString(java.lang.StringBuilder strb)
asString
in class UnifiedJEXL.Expression
strb
- the builder to fillprotected java.lang.Object evaluate(Interpreter interpreter)
evaluate
in class UnifiedJEXL.Expression
interpreter
- a JEXL interpreterpublic java.util.Set<java.util.List<java.lang.String>> getVariables()
This method will visit all nodes of the sub-expressions and extract all variables whether they are written in 'dot' or 'bracketed' notation. (a.b is equivalent to a['b']).
getVariables
in class UnifiedJEXL.Expression
protected void getVariables(java.util.Set<java.util.List<java.lang.String>> refs)
getVariables
in class UnifiedJEXL.Expression
refs
- the set of variable being filled