| Prev Class | Next Class | Frames | No Frames |
| Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Objectorg.apache.bsf.util.BSFEngineImplField Summary | |
protected ClassLoader | |
protected String | |
protected BSFDebugManagerImpl | |
protected Vector | |
protected String | |
protected BSFManager | |
protected String | |
Constructor Summary | |
| |
Method Summary | |
Object |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
Object |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void | |
void |
|
protected ClassLoader classLoader
protected String classPath
protected Vector declaredBeans
protected String lang
protected String tempDir
public BSFEngineImpl()
Get the debug manager in the constructor, not in initialize. First, this is ok since the debug manager is not BSFManager dependent. Second, the debug manager needs to be known sooner than "initialize" for the JavaScript engine.
public Object apply(String source,
int lineNo,
int columnNo,
Object funcBody,
Vector paramNames,
Vector arguments)
throws BSFExceptionDefault impl of apply - calls eval ignorning parameters and returns the result.
public void compileApply(String source,
int lineNo,
int columnNo,
Object funcBody,
Vector paramNames,
Vector arguments,
CodeBuffer cb)
throws BSFExceptionDefault impl of compileApply - calls compileExpr ignorning parameters.
- Specified by:
- compileApply in interface BSFEngine
public void compileExpr(String source,
int lineNo,
int columnNo,
Object expr,
CodeBuffer cb)
throws BSFExceptionDefault impl of compileExpr - generates code that'll create a new manager, evaluate the expression, and return the value.
- Specified by:
- compileExpr in interface BSFEngine
public void compileScript(String source,
int lineNo,
int columnNo,
Object script,
CodeBuffer cb)
throws BSFExceptionDefault impl of compileScript - generates code that'll create a new manager, and execute the script.
- Specified by:
- compileScript in interface BSFEngine
public void declareBean(BSFDeclaredBean bean) throws BSFException
- Specified by:
- declareBean in interface BSFEngine
public void disconnectedDebuggerNotify()
Basic engines are not supporting breakpoints for the meaning and support is something that is language-specific.
- Specified by:
- disconnectedDebuggerNotify in interface BSFEngine
public void exec(String source,
int lineNo,
int columnNo,
Object script)
throws BSFExceptionDefault impl of execute - calls eval and ignores the result.
public Object getSpecificDebuggingInterface()
By default, an engine does not support debugging. Subclasses will need to redefine this method in order to provide debuggers with their language-specific interface for debugging.
- Specified by:
- getSpecificDebuggingInterface in interface BSFEngine
public void initialize(BSFManager mgr, String lang, Vector declaredBeans) throws BSFException
initialize the engine; called right after construction by the manager. Declared beans are simply kept in a vector and that's it. Subclasses must do whatever they want with it.
- Specified by:
- initialize in interface BSFEngine
public void placeBreakpointAtLine(int brkptid,
String docname,
int lineno)
throws BSFException
- Specified by:
- placeBreakpointAtLine in interface BSFEngine
public void placeBreakpointAtOffset(int brkptid,
String docname,
int offset)
throws BSFException
- Specified by:
- placeBreakpointAtOffset in interface BSFEngine
public void propertyChange(PropertyChangeEvent e)
Receive property change events from the manager and update my fields as needed.
- Parameters:
e- PropertyChange event with the change data
public void removeBreakpoint(String docname,
int brkptid)
throws BSFException
- Specified by:
- removeBreakpoint in interface BSFEngine
public void setEntryExit(String docname,
boolean on)
throws BSFException
- Specified by:
- setEntryExit in interface BSFEngine
public void undeclareBean(BSFDeclaredBean bean) throws BSFException
- Specified by:
- undeclareBean in interface BSFEngine