Package org.apache.el.lang
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 FunctionMapperImplmementoThe memento that stores captured function mappings.protected FunctionMappertargetThe target function mapper being wrapped.
-
Constructor Summary
Constructors Constructor Description FunctionMapperFactory(FunctionMapper mapper)Creates a new factory wrapping the given function mapper.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FunctionMappercreate()Creates an immutable snapshot of all function mappings captured so far.voidmapFunction(java.lang.String prefix, java.lang.String localName, java.lang.reflect.Method method)Map a method to a function name.java.lang.reflect.MethodresolveFunction(java.lang.String prefix, java.lang.String localName)Resolves a function reference to its corresponding staticMethod.
-
-
-
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.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
public void mapFunction(java.lang.String prefix, java.lang.String localName, java.lang.reflect.Method method)Description copied from class:jakarta.el.FunctionMapperMap a method to a function name.- Overrides:
mapFunctionin classFunctionMapper- Parameters:
prefix- Function prefixlocalName- Function namemethod- Method
-
create
public FunctionMapper create()
Creates an immutable snapshot of all function mappings captured so far.- Returns:
- The captured function mappings as a FunctionMapper
-
-