Save This Page
Home » bsf-src-2.4.0 » org.apache.bsf.util » [javadoc | source]
org.apache.bsf.util
abstract public class: BSFEngineImpl [javadoc | source]
java.lang.Object
   org.apache.bsf.util.BSFEngineImpl

All Implemented Interfaces:
    BSFEngine

Direct Known Subclasses:
    JavaClassEngine, JythonEngine, JPythonEngine, XSLTEngine, ActiveScriptEngine, JavaEngine, JaclEngine, NetRexxEngine, JavaScriptEngine

This is a base implementation of the BSFEngine interface which engine implementations may choose to extend to get the basic methods of the interface implemented.

Field Summary
protected  BSFManager mgr     
protected  String lang     
protected  Vector declaredBeans     
protected  String classPath     
protected  String tempDir     
protected  ClassLoader classLoader     
Method from org.apache.bsf.util.BSFEngineImpl Summary:
apply,   compileApply,   compileExpr,   compileScript,   declareBean,   exec,   iexec,   initialize,   propertyChange,   terminate,   undeclareBean
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.bsf.util.BSFEngineImpl Detail:
 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.
 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.
 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.
 public  void declareBean(BSFDeclaredBean bean) throws BSFException 
 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.
 public  void propertyChange(PropertyChangeEvent e) 
    Receive property change events from the manager and update my fields as needed.
 public  void terminate() 
 public  void undeclareBean(BSFDeclaredBean bean) throws BSFException