org.drools.semantics.python
Class Eval

java.lang.Object
  extended byorg.drools.semantics.python.Interp
      extended byorg.drools.semantics.python.Eval
Direct Known Subclasses:
ExprCondition

public class Eval
extends Interp

Base class for Jython expression-based Python semantic components.

Author:
bob mcwhirter , Christiaan ten Klooster
See Also:
s

Constructor Summary
protected Eval(String text, Rule rule)
          Construct.
 
Method Summary
protected  Object evaluate(org.python.core.PyDictionary locals)
          Evaluate.
 Object evaluate(Tuple tuple)
          Evaluate.
 Declaration[] getRequiredTupleMembers()
          Retrieve the array of Declaration s required by this condition to perform its duties.
 
Methods inherited from class org.drools.semantics.python.Interp
getCode, getGlobals, getGlobals, getNode, getRule, 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(String text,
               Rule rule)
        throws Exception
Construct.

Method Detail

evaluate

public Object evaluate(Tuple tuple)
                throws Exception
Evaluate.

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

evaluate

protected Object evaluate(org.python.core.PyDictionary locals)
                   throws Exception
Evaluate.

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

getRequiredTupleMembers

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

Returns:
The array of Declarations expected on incoming Tuples.


Copyright © 2001-2004 The Codehaus. All Rights Reserved.