Package org.smooks.api.expression
Interface ExpressionEvaluator
-
- All Known Subinterfaces:
ExecutionContextExpressionEvaluator
public interface ExpressionEvaluatorAbstract expression evaluator interface.- Author:
- tom.fennelly@gmail.com
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleaneval(Object contextObject)Evaluate a conditional expression against the supplied object (can be a Map).StringgetExpression()Get the String representation of the active expression on the evaluator instance.ObjectgetValue(Object contextObject)Evaluate an expression against the supplied Map variable, returning the eval result.ExpressionEvaluatorsetExpression(String expression)Set the condition expression for the evaluator implementation.
-
-
-
Method Detail
-
setExpression
ExpressionEvaluator setExpression(String expression) throws SmooksConfigException
Set the condition expression for the evaluator implementation.- Parameters:
expression- The expression to be evaluated by the evaluator implementation.- Throws:
SmooksConfigException- Invalid expression configuration.
-
getExpression
String getExpression()
Get the String representation of the active expression on the evaluator instance.- Returns:
- The active expression String representation.
-
eval
boolean eval(Object contextObject) throws ExpressionEvaluationException
Evaluate a conditional expression against the supplied object (can be a Map).- Parameters:
contextObject- The object against which the expression is to be evaluated.- Returns:
- True if the expression evaluates to true, otherwise false.
- Throws:
ExpressionEvaluationException- Invalid expression evaluation condition (implementation specific).
-
getValue
Object getValue(Object contextObject) throws ExpressionEvaluationException
Evaluate an expression against the supplied Map variable, returning the eval result.- Parameters:
contextObject-- Returns:
- Expression evaluation result.
- Throws:
ExpressionEvaluationException- Invalid expression evaluation (implementation specific).
-
-