org.drools.semantics.python
Class Interp

java.lang.Object
  |
  +--org.drools.semantics.python.Interp
Direct Known Subclasses:
Eval, Exec

public class Interp
extends java.lang.Object

Base class for Jython interpreter-based Python semantic components.

Version:
$Id: Interp.java,v 1.4 2002/08/27 06:46:44 bob Exp $
Author:
bob mcwhirter
See Also:
Eval, Exec

Constructor Summary
protected Interp()
          Construct.
 
Method Summary
protected  org.python.core.PyCode getCode()
          Retrieve the compiled code.
 org.python.parser.ast.modType getNode()
          Retrieve the AST node.
 java.lang.String getText()
          Retrieve the text to evaluate.
protected  void setText(java.lang.String text, java.lang.String type)
          Set the text to evaluate.
protected  org.python.core.PyDictionary setUpDictionary(Tuple tuple)
          Configure a PyDictionary using a Tuple for variable bindings.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Interp

protected Interp()
Construct.
Method Detail

getText

public java.lang.String getText()
Retrieve the text to evaluate.
Returns:
The text to evaluate.

setText

protected void setText(java.lang.String text,
                       java.lang.String type)
Set the text to evaluate.
Parameters:
text - The text.
type - The type ("exec" or "eval").

getNode

public org.python.parser.ast.modType getNode()
Retrieve the AST node.
Returns:
The node.

getCode

protected org.python.core.PyCode getCode()
Retrieve the compiled code.
Returns:
The code.

setUpDictionary

protected org.python.core.PyDictionary setUpDictionary(Tuple tuple)
Configure a PyDictionary using a Tuple for variable bindings.
Parameters:
tuple - Tuple containing variable bindings.
Returns:
The dictionary


Copyright © 2001-2003 The Werken Company. All Rights Reserved.