org.thymeleaf.standard.expression
Class OgnlVariableExpressionEvaluator
Object
org.thymeleaf.standard.expression.OgnlVariableExpressionEvaluator
- All Implemented Interfaces:
- IStandardVariableExpressionEvaluator
public class OgnlVariableExpressionEvaluator
- extends Object
- implements IStandardVariableExpressionEvaluator
- Since:
- 2.0.9
- Author:
- Daniel Fernández
INSTANCE
public static final OgnlVariableExpressionEvaluator INSTANCE
OgnlVariableExpressionEvaluator
protected OgnlVariableExpressionEvaluator()
evaluate
public final Object evaluate(Configuration configuration,
IProcessingContext processingContext,
String expression,
StandardExpressionExecutionContext expContext,
boolean useSelectionAsRoot)
- Description copied from interface:
IStandardVariableExpressionEvaluator
Evaluate the variable expression.
- Specified by:
evaluate
in interface IStandardVariableExpressionEvaluator
- Parameters:
configuration
- the Configuration object for the template execution environment.processingContext
- the processing context object containing the variables to be applied to the expression.expression
- the expression to be evaluated (as a String).expContext
- the expression execution context to be applied (preprocessing, etc.)useSelectionAsRoot
- specify whether this is a variable expression (${...}, false) or a
selection variable expression (*{...}, true).
- Returns:
- the result of evaluating the expression.
computeAdditionalContextVariables
protected Map<String,Object> computeAdditionalContextVariables(IProcessingContext processingContext)
setVariableRestrictions
protected void setVariableRestrictions(StandardExpressionExecutionContext expContext,
Object evaluationRoot,
Map<String,Object> contextVariables)
toString
public String toString()
- Overrides:
toString
in class Object
shouldApplyOgnlBooleanFix
protected boolean shouldApplyOgnlBooleanFix()
Determines whether a fix should be applied to OGNL in order
to evaluate Strings as booleans in the same way as
Thymeleaf does ('false', 'off' and 'no' are actually "false"
instead of OGNL's default "true").
- Returns:
- whether the OGNL boolean fix should be applied or not.
Copyright © 2014 The THYMELEAF team. All Rights Reserved.