Class JexlExpressionResolver
java.lang.Object
com.thewinterframework.expression.JexlExpressionResolver
- All Implemented Interfaces:
ExpressionResolver
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddContext(String key, Object value) Add a context to the expression resolver.<S,T> void addConverter(Class<S> source, Class<T> target, Converter<S, T> converter) <T> TResolves the given expression for the specified method and return type.
-
Constructor Details
-
JexlExpressionResolver
public JexlExpressionResolver()
-
-
Method Details
-
resolve
Description copied from interface:ExpressionResolverResolves the given expression for the specified method and return type.- Specified by:
resolvein interfaceExpressionResolver- Type Parameters:
T- the type of the resolved value- Parameters:
expression- the expression to resolveexpectedReturnType- the expected return type- Returns:
- the resolved value, or null if it cannot be resolved
-
addContext
Description copied from interface:ExpressionResolverAdd a context to the expression resolver.- Specified by:
addContextin interfaceExpressionResolver- Parameters:
key- The key of the contextvalue- The value/provider of the context
-
addConverter
- Specified by:
addConverterin interfaceExpressionResolver
-