Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
org.apache.bsf.util.BSFEngineImpl
Field Summary | |
protected ClassLoader | |
protected String | |
protected Vector | |
protected String | |
protected BSFManager | |
protected String |
Method Summary | |
Object |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
protected ClassLoader classLoader
protected String classPath
protected Vector declaredBeans
protected String lang
protected String tempDir
public Object apply(String source, int lineNo, int columnNo, Object funcBody, Vector paramNames, Vector arguments) throws BSFException
Default impl of apply - calls eval ignoring parameters and returns the result.
public void compileApply(String source, int lineNo, int columnNo, Object funcBody, Vector paramNames, Vector arguments, CodeBuffer cb) throws BSFException
Default impl of compileApply - calls compileExpr ignoring parameters.
- Specified by:
- compileApply in interface BSFEngine
public void compileExpr(String source, int lineNo, int columnNo, Object expr, CodeBuffer cb) throws BSFException
Default 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 BSFException
Default 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
Declare a bean after the engine has been started. Declared beans are beans that are named and which the engine must make available to the scripts it runs in the most first class way possible.
- Specified by:
- declareBean in interface BSFEngine
- Parameters:
bean
- the bean to declare
- Throws:
BSFException
- if the engine cannot do this operation
public void exec(String source, int lineNo, int columnNo, Object script) throws BSFException
Default impl of execute - calls eval and ignores the result.
public void iexec(String source, int lineNo, int columnNo, Object script) throws BSFException
Default impl of interactive execution - calls eval and ignores the result.
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 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 undeclareBean(BSFDeclaredBean bean) throws BSFException
Undeclare a previously declared bean.
- Specified by:
- undeclareBean in interface BSFEngine
- Parameters:
bean
- the bean to undeclare
- Throws:
BSFException
- if the engine cannot do this operation