org.apache.bsf.engines.javaclass

Class JavaClassEngine

Implemented Interfaces:
BSFEngine, PropertyChangeListener

public class JavaClassEngine
extends BSFEngineImpl

This is the interface to scripts consisting of Java objects from the Bean Scripting Framework.

Author:
Sanjiva Weerawarana

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.
Object
eval(String source, int lineNo, int columnNo, Object oscript)
This is used by an application to evaluate an object containing some expression - clearly not possible for compiled code ..

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. If object is an instance of Class, then the call is a static call on that object. If not, its an instance method call or a static call (as per Java) on the given object.
Specified by:
call in interface BSFEngine


eval

public Object eval(String source,
                   int lineNo,
                   int columnNo,
                   Object oscript)
            throws BSFException
This is used by an application to evaluate an object containing some expression - clearly not possible for compiled code ..
Specified by:
eval in interface BSFEngine