Class TemplateEngine.ConstantExpression
- java.lang.Object
-
- org.apache.commons.jexl3.internal.TemplateEngine.TemplateExpression
-
- org.apache.commons.jexl3.internal.TemplateEngine.ConstantExpression
-
- All Implemented Interfaces:
JxltEngine.Expression
- Enclosing class:
- TemplateEngine
final class TemplateEngine.ConstantExpression extends TemplateEngine.TemplateExpression
A constant unified expression.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.ObjectvalueThe constant held by this unified expression.-
Fields inherited from class org.apache.commons.jexl3.internal.TemplateEngine.TemplateExpression
source
-
-
Constructor Summary
Constructors Constructor Description ConstantExpression(java.lang.Object val, TemplateEngine.TemplateExpression source)Creates a constant unified expression.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringBuilderasString(java.lang.StringBuilder strb)Adds this expression's string representation to a StringBuilder.protected java.lang.Objectevaluate(Interpreter interpreter)Interprets a sub-expression.(package private) TemplateEngine.ExpressionTypegetType()Gets this TemplateExpression type.-
Methods inherited from class org.apache.commons.jexl3.internal.TemplateEngine.TemplateExpression
asString, evaluate, evaluate, getInfo, getSource, getVariables, getVariables, isDeferred, isImmediate, options, prepare, prepare, prepare, toString
-
-
-
-
Constructor Detail
-
ConstantExpression
ConstantExpression(java.lang.Object val, TemplateEngine.TemplateExpression source)Creates a constant unified expression.- Parameters:
val- the constant valuesource- the source TemplateExpression if any
-
-
Method Detail
-
asString
public java.lang.StringBuilder asString(java.lang.StringBuilder strb)
Description copied from interface:JxltEngine.ExpressionAdds this expression's string representation to a StringBuilder.- Parameters:
strb- the builder to fill- Returns:
- the builder argument
-
evaluate
protected java.lang.Object evaluate(Interpreter interpreter)
Description copied from class:TemplateEngine.TemplateExpressionInterprets a sub-expression.- Specified by:
evaluatein classTemplateEngine.TemplateExpression- 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
-
-