Package com.github.dozermapper.core.el
Class DefaultELEngine
- java.lang.Object
-
- com.github.dozermapper.core.el.DefaultELEngine
-
- All Implemented Interfaces:
ELEngine
- Direct Known Subclasses:
TcclELEngine
public class DefaultELEngine extends Object implements ELEngine
ELEngine implementation that uses anExpressionFactoryandSimpleELContextto resolve variables and functions
-
-
Field Summary
Fields Modifier and Type Field Description protected jakarta.el.ELContextelContextprotected jakarta.el.ExpressionFactoryexpressionFactory
-
Constructor Summary
Constructors Constructor Description DefaultELEngine(jakarta.el.ExpressionFactory expressionFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringresolve(String expression)Resolves expressionvoidsetFunction(String prefix, Method method)Sets a function to resolvevoidsetFunction(String prefix, String name, Method method)Sets a function to resolve<T> voidsetVariable(String key, T value)Sets a variable to resolve<T> voidsetVariable(String key, T value, Class<? extends T> type)Sets a variable
-
-
-
Method Detail
-
setVariable
public <T> void setVariable(String key, T value)
Sets a variable to resolve- Specified by:
setVariablein interfaceELEngine- Type Parameters:
T- generic type of value- Parameters:
key- key to storevalue- value to resolve
-
setVariable
public <T> void setVariable(String key, T value, Class<? extends T> type)
Sets a variable- Specified by:
setVariablein interfaceELEngine- Type Parameters:
T- generic type of value- Parameters:
key- key to storevalue- value to resolvetype- type of value
-
setFunction
public void setFunction(String prefix, Method method)
Sets a function to resolve- Specified by:
setFunctionin interfaceELEngine- Parameters:
prefix- the prefix of the functionmethod- method to resolve
-
setFunction
public void setFunction(String prefix, String name, Method method)
Sets a function to resolve- Specified by:
setFunctionin interfaceELEngine- Parameters:
prefix- the prefix of the functionname- name of methhodmethod- method to resolve
-
-