org.apache.bsf.engines.jpython

Class JPythonEngine

Implemented Interfaces:
BSFEngine, PropertyChangeListener

public class JPythonEngine
extends BSFEngineImpl

This is the interface to JPython (http://www.jpython.org/) from BSF.
Authors:
Sanjiva Weerawarana
Finn Bock

Field Summary

Fields inherited from class org.apache.bsf.util.BSFEngineImpl

classLoader, classPath, dbgmgr, declaredBeans, lang, mgr, tempDir

Method Summary

Object
call(Object object, String method, Object[] args)
call the named method of the given object.
void
declareBean(BSFDeclaredBean bean)
Declare a bean
Object
eval(String source, int lineNo, int columnNo, Object script)
Evaluate an expression.
void
exec(String source, int lineNo, int columnNo, Object script)
Execute a script.
void
initialize(BSFManager mgr, String lang, Vector declaredBeans)
Initialize the engine.
void
undeclareBean(BSFDeclaredBean bean)
Undeclare a previously declared bean.
Object
unwrap(PyObject result)

Methods inherited from class org.apache.bsf.util.BSFEngineImpl

apply, compileApply, compileExpr, compileScript, declareBean, disconnectedDebuggerNotify, exec, getSpecificDebuggingInterface, initialize, placeBreakpointAtLine, placeBreakpointAtOffset, propertyChange, removeBreakpoint, setEntryExit, terminate, undeclareBean

Method Details

call

public Object call(Object object,
                   String method,
                   Object[] args)
            throws BSFException
call the named method of the given object.
Specified by:
call in interface BSFEngine

declareBean

public void declareBean(BSFDeclaredBean bean)
            throws BSFException
Declare a bean
Specified by:
declareBean in interface BSFEngine
Overrides:
declareBean in interface BSFEngineImpl

eval

public Object eval(String source,
                   int lineNo,
                   int columnNo,
                   Object script)
            throws BSFException
Evaluate an expression.
Specified by:
eval in interface BSFEngine

exec

public void exec(String source,
                 int lineNo,
                 int columnNo,
                 Object script)
            throws BSFException
Execute a script.
Specified by:
exec in interface BSFEngine
Overrides:
exec in interface BSFEngineImpl

initialize

public void initialize(BSFManager mgr,
                       String lang,
                       Vector declaredBeans)
            throws BSFException
Initialize the engine.
Specified by:
initialize in interface BSFEngine
Overrides:
initialize in interface BSFEngineImpl

undeclareBean

public void undeclareBean(BSFDeclaredBean bean)
            throws BSFException
Undeclare a previously declared bean.
Specified by:
undeclareBean in interface BSFEngine
Overrides:
undeclareBean in interface BSFEngineImpl

unwrap

public Object unwrap(PyObject result)