android-components / mozilla.components.lib.jexl / Jexl / evaluate

# evaluate

`fun evaluate(expression: String, context: JexlContext = JexlContext()): JexlValue` (source)

Evaluates a Jexl string within an optional context.

### Parameters

`expression` - The Jexl expression to be evaluated.

`context` - A mapping of variables to values, which will be made accessible to the Jexl expression when evaluating it.

### Exceptions

`JexlException` - if lexing, parsing or evaluating the expression failed.

Return
The result of the evaluation.