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 Details

    • VariableMapperFactory

      public VariableMapperFactory(VariableMapper target)
      Constructs a new VariableMapperFactory.
      Parameters:
      target - The target variable mapper to delegate to
      Throws:
      NullPointerException - if target is null
  • Method Details

    • create

      public VariableMapper create()
      Returns the momento mapper containing all resolved variables.
      Returns:
      the momento mapper, or null if no variables have been resolved
    • resolveVariable

      public ValueExpression resolveVariable(String variable)
      Description copied from class: jakarta.el.VariableMapper
      Resolves a variable name to its corresponding ValueExpression.
      Specified by:
      resolveVariable in class VariableMapper
      Parameters:
      variable - the name of the variable to resolve
      Returns:
      the ValueExpression for the variable, or null if not found
    • setVariable

      public ValueExpression setVariable(String variable, ValueExpression expression)
      Description copied from class: jakarta.el.VariableMapper
      Sets or removes a variable mapping.
      Specified by:
      setVariable in class VariableMapper
      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