org.drools.semantics.groovy
Class Eval

java.lang.Object
  |
  +--org.drools.semantics.groovy.Interp
        |
        +--org.drools.semantics.groovy.Eval
Direct Known Subclasses:
ExprCondition, ExprExtractor

public class Eval
extends Interp

Base class for Groovy based semantic components.

Version:
$Id: Eval.java,v 1.1 2003/12/09 19:54:06 jstrachan Exp $
Author:
James Strachan
See Also:
ExprCondition, ExprExtractor

Constructor Summary
protected Eval(java.lang.String text, Declaration[] availDecls)
          Construct.
 
Method Summary
protected  Declaration[] analyze(Declaration[] availDecls)
           
protected  java.lang.Object evaluate()
          Evaluate.
protected  java.lang.Object evaluate(groovy.lang.ScriptContext locals)
          Evaluate.
 java.lang.Object evaluate(Tuple tuple)
          Evaluate.
 Declaration[] getRequiredTupleMembers()
          Retrieve the array of Declarations required by this condition to perform its duties.
 
Methods inherited from class org.drools.semantics.groovy.Interp
getCode, getNode, getText, setUpDictionary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Eval

protected Eval(java.lang.String text,
               Declaration[] availDecls)
        throws java.lang.Exception
Construct.

Method Detail

evaluate

public java.lang.Object evaluate(Tuple tuple)
Evaluate.

Parameters:
tuple - Tuple containing variable bindings.
Returns:
The result of evaluation.

evaluate

protected java.lang.Object evaluate(groovy.lang.ScriptContext locals)
Evaluate.

Parameters:
locals - The evaluation dictionary.
Returns:
The result of evaluation.

evaluate

protected java.lang.Object evaluate()
Evaluate.

Returns:
The result of evaluation.

getRequiredTupleMembers

public Declaration[] getRequiredTupleMembers()
Retrieve the array of Declarations required by this condition to perform its duties.

Returns:
The array of Declarations expected on incoming Tuples.

analyze

protected Declaration[] analyze(Declaration[] availDecls)
                         throws java.lang.Exception
java.lang.Exception