Class VariableMapper
java.lang.Object
jakarta.el.VariableMapper
Manages the mapping between variable names and their corresponding
ValueExpression instances within an
ELContext. Variable mappings allow EL expressions to reference named variables that resolve to computed
values.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract ValueExpressionresolveVariable(String variable) Resolves a variable name to its corresponding ValueExpression.abstract ValueExpressionsetVariable(String variable, ValueExpression expression) Sets or removes a variable mapping.
-
Constructor Details
-
VariableMapper
public VariableMapper()Default constructor for subclasses.
-
-
Method Details
-
resolveVariable
Resolves a variable name to its corresponding ValueExpression.- Parameters:
variable- the name of the variable to resolve- Returns:
- the ValueExpression for the variable, or
nullif not found
-
setVariable
Sets or removes a variable mapping.- Parameters:
variable- the name of the variableexpression- the ValueExpression to associate with the variable, ornullto remove the mapping- Returns:
- the previous ValueExpression for the variable, or
nullif there was no mapping
-