private class UnifiedJEXL.ConstantExpression extends UnifiedJEXL.Expression
Modifier and Type | Field and Description |
---|---|
private java.lang.Object |
value
The constant held by this expression.
|
source
Constructor and Description |
---|
ConstantExpression(java.lang.Object val,
UnifiedJEXL.Expression source)
Creates a constant 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.
|
(package private) UnifiedJEXL.ExpressionType |
getType()
Gets this expression type.
|
asString, evaluate, getSource, getVariables, getVariables, isDeferred, isImmediate, prepare, prepare, toString
ConstantExpression(java.lang.Object val, UnifiedJEXL.Expression source)
If the wrapped constant is a string, it is treated as a JEXL strings with respect to escaping.
val
- the constant valuesource
- the source expression if anyUnifiedJEXL.ExpressionType getType()
getType
in class UnifiedJEXL.Expression
public 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 interpreter