public interface ExpressionLanguage
| Modifier and Type | Method and Description |
|---|---|
void |
addGlobalBindings(BindingContext bindingContext)
Includes the bindings in a given
BindingContext as global ones, that should not change often and should be considered
for all subsequent operations. |
default CompiledExpression |
compile(String expression,
BindingContext context)
Compiles a specified expression with a given binding context and returns the CompiledExpression`
|
default CompiledExpression |
compile(String nameIdentifier,
String expression,
BindingContext context)
Compiles a specified expression with a given binding context and a name.
|
TypedValue<?> |
evaluate(String expression,
BindingContext context)
Evaluates an expression according to a given
BindingContext and the global one. |
TypedValue<?> |
evaluate(String expression,
DataType expectedOutputType,
BindingContext context)
Evaluates an expression according to a given
BindingContext, the global one and the DataType of the expected
result. |
TypedValue<?> |
evaluateLogExpression(String expression,
BindingContext context)
Evaluates an expression according to a given
BindingContext and the global one. |
default ExpressionLanguageSession |
openSession(BindingContext context)
Returns an object that caches computation results.
|
Iterator<TypedValue<?>> |
split(String expression,
BindingContext context)
Splits using the specified expression.
|
ValidationResult |
validate(String expression)
Verifies whether an expression is valid or not syntactically.
|
void addGlobalBindings(BindingContext bindingContext)
BindingContext as global ones, that should not change often and should be considered
for all subsequent operations.bindingContext - the context containing the bindings to addTypedValue<?> evaluate(String expression, BindingContext context) throws ExpressionExecutionException
BindingContext and the global one.expression - the EL expressioncontext - the current dynamic binding context to considerExpressionExecutionException - when an error occurs during evaluationTypedValue<?> evaluate(String expression, DataType expectedOutputType, BindingContext context) throws ExpressionExecutionException
BindingContext, the global one and the DataType of the expected
result.expression - the EL expressionexpectedOutputType - the expected output type so that automatic conversion can be performed for the resulting value
type.context - the current dynamic binding context to considerExpressionExecutionException - when an error occurs during evaluation or while parsingTypedValue<?> evaluateLogExpression(String expression, BindingContext context) throws ExpressionExecutionException
BindingContext and the global one.
The evaluation of this script will do a best effort to avoid failing when the result value can not be represented in the
corresponding format.expression - the EL expressioncontext - the current dynamic binding context to considerExpressionExecutionException - when an error occurs during evaluationValidationResult validate(String expression)
expression - to be validatedValidationResult indicating whether the validation was successful or notIterator<TypedValue<?>> split(String expression, BindingContext context)
expression - the expression to be used to splitcontext - the current dynamic binding context to considerdefault CompiledExpression compile(String expression, BindingContext context) throws ExpressionCompilationException
expression - The expressioncontext - The context to compile againstExpressionCompilationException - when an error occurs during compilationdefault CompiledExpression compile(String nameIdentifier, String expression, BindingContext context) throws ExpressionCompilationException
expression - The expressioncontext - The context to compile againstnameIdentifier - The nameIdentifier to be given to the compiled expressionExpressionCompilationException - when an error occurs during compilationdefault ExpressionLanguageSession openSession(BindingContext context)
Sessions obtained through this method have to be explicitly closed.
context - the current dynamic binding context to considercontextCopyright © 2025 MuleSoft, Inc.. All rights reserved.