Class VariableMapper

java.lang.Object
jakarta.el.VariableMapper

public abstract class VariableMapper extends Object
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 Details

    • VariableMapper

      public VariableMapper()
      Default constructor for subclasses.
  • Method Details

    • resolveVariable

      public abstract ValueExpression resolveVariable(String variable)
      Resolves a variable name to its corresponding ValueExpression.
      Parameters:
      variable - the name of the variable to resolve
      Returns:
      the ValueExpression for the variable, or null if not found
    • setVariable

      public abstract ValueExpression setVariable(String variable, ValueExpression expression)
      Sets or removes a variable mapping.
      Parameters:
      variable - the name of the variable
      expression - the ValueExpression to associate with the variable, or null to remove the mapping
      Returns:
      the previous ValueExpression for the variable, or null if there was no mapping