Class VariableMapperFactory


  • public class VariableMapperFactory
    extends VariableMapper
    Factory for creating variable mappers that track variable resolutions.
    • 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 null if no variables have been resolved
      • resolveVariable

        public ValueExpression resolveVariable​(java.lang.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​(java.lang.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