org.drools.semantics.java
Class Interp
java.lang.Object
|
+--org.drools.semantics.java.Interp
- Direct Known Subclasses:
- BlockConsequence, Expr
- public class Interp
- extends java.lang.Object
Base class for BeanShell interpreter-based Java semantic components.
- Version:
- $Id: Interp.java,v 1.7 2003/03/25 19:47:29 tdiesler Exp $
- Author:
- bob mcwhirter
- See Also:
ExprCondition
,
ExprExtractor
,
BlockConsequence
Constructor Summary |
protected |
Interp()
Construct. |
Method Summary |
protected java.lang.Object |
evaluate(bsh.NameSpace ns)
Evaluate. |
java.lang.Object |
evaluate(Tuple tuple)
Evaluate. |
java.lang.String |
getText()
Retrieve the text to evaluate. |
protected void |
setText(java.lang.String text)
Set the text to evaluate. |
protected bsh.NameSpace |
setUpNameSpace(Tuple tuple)
Configure a NameSpace using a Tuple
for variable bindings. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Interp
protected Interp()
- Construct.
evaluate
public java.lang.Object evaluate(Tuple tuple)
throws bsh.EvalError
- Evaluate.
- Parameters:
tuple
- Tuple containing variable bindings.- Returns:
- The result of evaluation.
- Throws:
bsh.EvalError
- If an error occurs while attempting
to evaluate.
evaluate
protected java.lang.Object evaluate(bsh.NameSpace ns)
throws bsh.EvalError
- Evaluate.
- Parameters:
ns
- The evaluation namespace.- Returns:
- The result of evaluation.
- Throws:
bsh.EvalError
- If an error occurs while attempting
to evaluate.
getText
public java.lang.String getText()
- Retrieve the text to evaluate.
- Returns:
- The text to evaluate.
setText
protected void setText(java.lang.String text)
- Set the text to evaluate.
- Parameters:
text
- The text.
setUpNameSpace
protected bsh.NameSpace setUpNameSpace(Tuple tuple)
throws bsh.EvalError
- Configure a
NameSpace
using a Tuple
for variable bindings.
- Parameters:
tuple
- Tuple containing variable bindings.- Returns:
- The namespace
- Throws:
bsh.EvalError
- If an error occurs while attempting
to bind variables.
Copyright © 2001-2003 The Werken Company. All Rights Reserved.