public class MVELExpressionEvaluator extends Object implements ExpressionEvaluator
ExpressionEvaluator.Factory
Constructor and Description |
---|
MVELExpressionEvaluator() |
MVELExpressionEvaluator(String expression) |
Modifier and Type | Method and Description |
---|---|
boolean |
eval(Object contextObject)
Evaluate a conditional expression against the supplied object (can be a Map).
|
Object |
exec(Object contextObject) |
Object |
exec(Object contextObject,
Map<String,Object> variableMap) |
Serializable |
getCompiled() |
String |
getExpression()
Get the String representation of the active expression on the evaluator instance.
|
Object |
getValue(Object contextObject)
Evaluate an expression against the supplied Map variable, returning the eval result.
|
ExpressionEvaluator |
setExpression(String expression)
Set the condition expression for the evaluator implementation.
|
void |
setToType(Class<?> toType) |
String |
toString() |
public MVELExpressionEvaluator()
public MVELExpressionEvaluator(String expression)
public ExpressionEvaluator setExpression(String expression) throws SmooksConfigurationException
ExpressionEvaluator
setExpression
in interface ExpressionEvaluator
expression
- The expression to be evaluated by the evaluator implementation.SmooksConfigurationException
- Invalid expression configuration.public String getExpression()
ExpressionEvaluator
getExpression
in interface ExpressionEvaluator
public void setToType(Class<?> toType)
public boolean eval(Object contextObject) throws ExpressionEvaluationException
ExpressionEvaluator
eval
in interface ExpressionEvaluator
contextObject
- The object against which the expression is to be evaluated.ExpressionEvaluationException
- Invalid expression evaluation condition (implementation specific).public Object exec(Object contextObject, Map<String,Object> variableMap) throws ExpressionEvaluationException
ExpressionEvaluationException
public Object exec(Object contextObject) throws ExpressionEvaluationException
ExpressionEvaluationException
public Object getValue(Object contextObject) throws ExpressionEvaluationException
ExpressionEvaluator
getValue
in interface ExpressionEvaluator
ExpressionEvaluationException
- Invalid expression evaluation (implementation specific).public Serializable getCompiled()
Copyright © 2020. All rights reserved.