# 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 Summary

Constructors
Constructor
Description
`VariableMapper()`
Default constructor for subclasses.

## Method Summary

Modifier and Type
Method
Description
`abstract ValueExpression`
`resolveVariable(String variable)`
Resolves a variable name to its corresponding ValueExpression.
`abstract ValueExpression`
`setVariable(String variable, ValueExpression expression)`
Sets or removes a variable mapping.

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## 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