com.didana.codecontract.core
Class ExpressionHandler
java.lang.Object
com.didana.codecontract.core.ExpressionHandler
public class ExpressionHandler
- extends java.lang.Object
This class represents the context in which all contracts
are evaluated during a runtime check of precondition/postcondition.
The expressionStrings ArrayList must be a list of
Strings representing the contracts that should be checked.
The variables Map contains the values of all variables
in the context of which the expressions expressionStrings
should be evaluated.
- Author:
- Diana Berberova
Constructor Summary |
ExpressionHandler(java.util.ArrayList<java.lang.String> expressionStrings,
java.util.Map variables)
Creates new Expression handler object. |
Method Summary |
boolean |
evaluateExpressions()
Evaluates the expressions in the current jexl context. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ExpressionHandler
public ExpressionHandler(java.util.ArrayList<java.lang.String> expressionStrings,
java.util.Map variables)
- Creates new Expression handler object.
- Parameters:
expressionStrings
- - the expression strings that should be evaluated.variables
- - the variables that take part in evaluation
evaluateExpressions
public boolean evaluateExpressions()
- Evaluates the expressions in the current jexl context.
- Returns:
- true if all the expressions
are evaluated true and false otherwise.