org.drools.semantics.java
Class Expr

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

public class Expr
extends Object
implements Serializable

Base class for expression-based Java semantic components.

Author:
bob mcwhirter
See Also:
ExprCondition, Serialized Form

Nested Class Summary
static interface Expr.ConditionScript
           
 
Constructor Summary
protected Expr(String expr, Rule rule)
          Construct.
 
Method Summary
protected  List analyze(String expr, List available)
           
 boolean evaluateCondition(Tuple tuple)
           
 String getExpression()
          Retrieve the expression.
 Declaration[] getRequiredTupleMembers()
          Retrieve the Declaration s required for evaluating the expression.
protected  Rule getRule()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Expr

protected Expr(String expr,
               Rule rule)
        throws Exception
Construct.

Parameters:
expr - The expression.
rule - The rule.
Throws:
ConfigurationException - If an error occurs while attempting to perform configuration.
Exception
Method Detail

getExpression

public String getExpression()
Retrieve the expression.

Returns:
The expression.

evaluateCondition

public boolean evaluateCondition(Tuple tuple)
                          throws Exception
Throws:
Exception

analyze

protected List analyze(String expr,
                       List available)
                throws Exception
Throws:
Exception

getRequiredTupleMembers

public Declaration[] getRequiredTupleMembers()
Retrieve the Declaration s required for evaluating the expression.

Returns:
The required declarations.

getRule

protected Rule getRule()


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