# Class FunctionMapperFactory

java.lang.Object
jakarta.el.FunctionMapper
org.apache.el.lang.FunctionMapperFactory

public class FunctionMapperFactory extends FunctionMapper
Factory that wraps a target FunctionMapper, capturing all function mappings so that an immutable snapshot can be created.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected FunctionMapperImpl`
  `memento`
  The memento that stores captured function mappings.
  `protected final FunctionMapper`
  `target`
  The target function mapper being wrapped.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `FunctionMapperFactory(FunctionMapper mapper)`
  Creates a new factory wrapping the given function mapper.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `FunctionMapper`
  `create()`
  Creates an immutable snapshot of all function mappings captured so far.
  `void`
  `mapFunction(String prefix, String localName, Method method)`
  Map a method to a function name.
  `Method`
  `resolveFunction(String prefix, String localName)`
  Resolves a function reference to its corresponding static `Method`.

  ### Methods inherited from class Object

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

- ## Field Details

  - ### memento

    protected FunctionMapperImpl memento
    The memento that stores captured function mappings.

  - ### target

    protected final FunctionMapper target
    The target function mapper being wrapped.

- ## Constructor Details

  - ### FunctionMapperFactory

    public FunctionMapperFactory(FunctionMapper mapper)
    Creates a new factory wrapping the given function mapper.
    Parameters:
      `mapper` - The target function mapper to wrap

- ## Method Details

  - ### resolveFunction

    public Method resolveFunction(String prefix, String localName)
    Description copied from class: `jakarta.el.FunctionMapper`
    Resolves a function reference to its corresponding static `Method`.
    Specified by:
      `resolveFunction` in class `FunctionMapper`
    Parameters:
      `prefix` - the namespace prefix of the function
      `localName` - the local name of the function
    Returns:
      the `Method` object for the resolved function, or `null` if not found

  - ### mapFunction

    public void mapFunction(String prefix, String localName, Method method)
    Description copied from class: `jakarta.el.FunctionMapper`
    Map a method to a function name.
    Overrides:
      `mapFunction` in class `FunctionMapper`
    Parameters:
      `prefix` - Function prefix
      `localName` - Function name
      `method` - Method

  - ### create

    public FunctionMapper create()
    Creates an immutable snapshot of all function mappings captured so far.
    Returns:
      The captured function mappings as a FunctionMapper