Class VariableMapperFactory
java.lang.Object
jakarta.el.VariableMapper
org.apache.el.lang.VariableMapperFactory
Factory for creating variable mappers that track variable resolutions.
-
Constructor Summary
ConstructorsConstructorDescriptionVariableMapperFactory(VariableMapper target) Constructs a new VariableMapperFactory. -
Method Summary
Modifier and TypeMethodDescriptioncreate()Returns the momento mapper containing all resolved variables.resolveVariable(String variable) Resolves a variable name to its corresponding ValueExpression.setVariable(String variable, ValueExpression expression) Sets or removes a variable mapping.
-
Constructor Details
-
VariableMapperFactory
Constructs a new VariableMapperFactory.- Parameters:
target- The target variable mapper to delegate to- Throws:
NullPointerException- if target is null
-
-
Method Details
-
create
Returns the momento mapper containing all resolved variables.- Returns:
- the momento mapper, or
nullif no variables have been resolved
-
resolveVariable
Description copied from class:jakarta.el.VariableMapperResolves a variable name to its corresponding ValueExpression.- Specified by:
resolveVariablein classVariableMapper- Parameters:
variable- the name of the variable to resolve- Returns:
- the ValueExpression for the variable, or
nullif not found
-
setVariable
Description copied from class:jakarta.el.VariableMapperSets or removes a variable mapping.- Specified by:
setVariablein classVariableMapper- 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
-