org.drools.semantics.groovy
Class Eval

java.lang.Object
  extended byorg.drools.semantics.groovy.Interp
      extended byorg.drools.semantics.groovy.Eval
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ExprCondition

public class Eval
extends Interp

Base class for Groovy based semantic components.

Author:
James Strachan , Christiaan ten Klooster
See Also:
ExprCondition, Serialized Form

Constructor Summary
protected Eval(String text, Rule rule)
          Construct.
 
Method Summary
protected  Object evaluate(groovy.lang.Binding 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.groovy.Interp
getCode, 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)
Evaluate.

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

evaluate

protected Object evaluate(groovy.lang.Binding locals)
Evaluate.

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

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.