Package org.apache.el.lang
Class VariableMapperFactory
- java.lang.Object
-
- jakarta.el.VariableMapper
-
- org.apache.el.lang.VariableMapperFactory
-
public class VariableMapperFactory extends VariableMapper
Factory for creating variable mappers that track variable resolutions.
-
-
Constructor Summary
Constructors Constructor Description VariableMapperFactory(VariableMapper target)Constructs a new VariableMapperFactory.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description VariableMappercreate()Returns the momento mapper containing all resolved variables.ValueExpressionresolveVariable(java.lang.String variable)Resolves a variable name to its corresponding ValueExpression.ValueExpressionsetVariable(java.lang.String variable, ValueExpression expression)Sets or removes a variable mapping.
-
-
-
Constructor Detail
-
VariableMapperFactory
public VariableMapperFactory(VariableMapper target)
Constructs a new VariableMapperFactory.- Parameters:
target- The target variable mapper to delegate to- Throws:
java.lang.NullPointerException- if target is null
-
-
Method Detail
-
create
public VariableMapper create()
Returns the momento mapper containing all resolved variables.- Returns:
- the momento mapper, or
nullif no variables have been resolved
-
resolveVariable
public ValueExpression resolveVariable(java.lang.String variable)
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
public ValueExpression setVariable(java.lang.String variable, ValueExpression expression)
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
-
-