org.apache.bsf.engines.javascript

Class JavaScriptEngine

public class JavaScriptEngine extends BSFEngineImpl

This is the interface to Netscape's Rhino (JavaScript) from the Bean Scripting Framework.

The original version of this code was first written by Adam Peller for use in LotusXSL. Sanjiva took his code and adapted it for BSF.

Author: Adam Peller Sanjiva Weerawarana Matthew J. Duftler Norris Boyd

Method Summary
Objectcall(Object object, String method, Object[] args)
Return an object from an extension.
voiddeclareBean(BSFDeclaredBean bean)
voiddisconnectedDebuggerNotify()
Objecteval(String source, int lineNo, int columnNo, Object oscript)
This is used by an application to evaluate a string containing some expression.
ObjectgetSpecificDebuggingInterface()
voidinitialize(BSFManager mgr, String lang, Vector declaredBeans)
initialize the engine. put the manager into the context -> manager map hashtable too.
voidplaceBreakpointAtLine(int brkptid, String docname, int lineno)
voidplaceBreakpointAtOffset(int brkptid, String docname, int offset)
voidremoveBreakpoint(String docname, int brkptid)
voidsetEntryExit(String docname, boolean on)
voidundeclareBean(BSFDeclaredBean bean)

Method Detail

call

public Object call(Object object, String method, Object[] args)
Return an object from an extension.

Parameters: object Object on which to make the call (ignored). method The name of the method to call. args an array of arguments to be passed to the extension, which may be either Vectors of Nodes, or Strings.

declareBean

public void declareBean(BSFDeclaredBean bean)

disconnectedDebuggerNotify

public void disconnectedDebuggerNotify()

eval

public Object eval(String source, int lineNo, int columnNo, Object oscript)
This is used by an application to evaluate a string containing some expression.

getSpecificDebuggingInterface

public Object getSpecificDebuggingInterface()

initialize

public void initialize(BSFManager mgr, String lang, Vector declaredBeans)
initialize the engine. put the manager into the context -> manager map hashtable too.

placeBreakpointAtLine

public void placeBreakpointAtLine(int brkptid, String docname, int lineno)

placeBreakpointAtOffset

public void placeBreakpointAtOffset(int brkptid, String docname, int offset)

removeBreakpoint

public void removeBreakpoint(String docname, int brkptid)

setEntryExit

public void setEntryExit(String docname, boolean on)

undeclareBean

public void undeclareBean(BSFDeclaredBean bean)