Class FunctionMapperFactory
java.lang.Object
jakarta.el.FunctionMapper
org.apache.el.lang.FunctionMapperFactory
Factory that wraps a target FunctionMapper, capturing all function mappings
so that an immutable snapshot can be created.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected FunctionMapperImplThe memento that stores captured function mappings.protected final FunctionMapperThe target function mapper being wrapped. -
Constructor Summary
ConstructorsConstructorDescriptionFunctionMapperFactory(FunctionMapper mapper) Creates a new factory wrapping the given function mapper. -
Method Summary
Modifier and TypeMethodDescriptioncreate()Creates an immutable snapshot of all function mappings captured so far.voidmapFunction(String prefix, String localName, Method method) Map a method to a function name.resolveFunction(String prefix, String localName) Resolves a function reference to its corresponding staticMethod.
-
Field Details
-
memento
The memento that stores captured function mappings. -
target
The target function mapper being wrapped.
-
-
Constructor Details
-
FunctionMapperFactory
Creates a new factory wrapping the given function mapper.- Parameters:
mapper- The target function mapper to wrap
-
-
Method Details
-
resolveFunction
Description copied from class:jakarta.el.FunctionMapperResolves a function reference to its corresponding staticMethod.- Specified by:
resolveFunctionin classFunctionMapper- Parameters:
prefix- the namespace prefix of the functionlocalName- the local name of the function- Returns:
- the
Methodobject for the resolved function, ornullif not found
-
mapFunction
Description copied from class:jakarta.el.FunctionMapperMap a method to a function name.- Overrides:
mapFunctionin classFunctionMapper- Parameters:
prefix- Function prefixlocalName- Function namemethod- Method
-
create
Creates an immutable snapshot of all function mappings captured so far.- Returns:
- The captured function mappings as a FunctionMapper
-