Class FunctionMapperFactory


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

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      FunctionMapper create()
      Creates an immutable snapshot of all function mappings captured so far.
      void mapFunction​(java.lang.String prefix, java.lang.String localName, java.lang.reflect.Method method)
      Map a method to a function name.
      java.lang.reflect.Method resolveFunction​(java.lang.String prefix, java.lang.String localName)
      Resolves a function reference to its corresponding static Method.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • memento

        protected FunctionMapperImpl memento
        The memento that stores captured function mappings.
      • target

        protected final FunctionMapper target
        The target function mapper being wrapped.
    • Constructor Detail

      • FunctionMapperFactory

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

      • resolveFunction

        public java.lang.reflect.Method resolveFunction​(java.lang.String prefix,
                                                        java.lang.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​(java.lang.String prefix,
                                java.lang.String localName,
                                java.lang.reflect.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