|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Interpreter
This is the interface to an interpreter of the evaluation operation. Implementations of this class are expected to be provided by the AEF/PEP at run-time. The implementations would tell what kind of terms they can interpret to complete the operation with a definite result. If the interpreter can evaluate an expression, it returns the resulting type of the expression, when canEvaluate method is invoked, and the evaluation result or an EvaluationException when an evaluate method is invoked.
Method Summary | |
---|---|
java.lang.String |
canEvaluate(Term[] t)
This method returns the string type of the result of evaluating the given set of Terms, or null, if the expression cannot be evaluated by this interpreter. |
java.lang.Object |
evaluate(Environment env,
Term[] t)
This method evaluates the expression given the environment. |
Method Detail |
---|
java.lang.String canEvaluate(Term[] t)
t
- - the array of Terms; can be null and can be empty
java.lang.Object evaluate(Environment env, Term[] t) throws EvaluationException
env
- - the Environment with variables used in IF-statementt
- - the sequence of Terms in the order that they appear in the
policy; can be null or an empty array
EvaluationException,
- if for some reason evaluation failed
EvaluationException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |