java.lang.Object | +--com.ibm.bsf.util.BSFEngineImpl | +--com.judoscript.BSFJudoEngine
This is the interface for BSF. Need to have IBM's BSF package in the classpath.
Fields inherited from class com.ibm.bsf.util.BSFEngineImpl |
classLoader, classPath, debug, debugStream, declaredBeans, lang, mgr, tempDir |
Constructor Summary | |
BSFJudoEngine()
|
Method Summary | |
java.lang.Object |
call(java.lang.Object object,
java.lang.String fxn,
java.lang.Object[] args)
Calls a function. |
void |
declareBean(com.ibm.bsf.BSFDeclaredBean bean)
Declare a bean. |
java.lang.Object |
eval(java.lang.String source,
int lineNo,
int columnNo,
java.lang.Object script)
Evaluates an expression. |
void |
exec(java.lang.String source,
int lineNo,
int columnNo,
java.lang.Object script)
Executes a script. |
void |
initialize(com.ibm.bsf.BSFManager mgr,
java.lang.String lang,
java.util.Vector declaredBeans)
Initializes the engine. |
void |
undeclareBean(com.ibm.bsf.BSFDeclaredBean bean)
Undeclare a previously declared bean. |
Methods inherited from class com.ibm.bsf.util.BSFEngineImpl |
apply, compileApply, compileExpr, compileScript, propertyChange, setDebug, terminate |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public BSFJudoEngine()
Method Detail |
public void initialize(com.ibm.bsf.BSFManager mgr, java.lang.String lang, java.util.Vector declaredBeans) throws com.ibm.bsf.BSFException
$$bsf
object in JudoScript, and sets all the declared beans as global variables.initialize
in class com.ibm.bsf.util.BSFEngineImpl
mgr
- the BSF manager.lang
- always "judoscript".declaredBeans
- objects to set during initialization; elements are
instances of com.ibm.bsf.DeclaredBean
.public java.lang.Object eval(java.lang.String source, int lineNo, int columnNo, java.lang.Object script) throws com.ibm.bsf.BSFException
eval
in class com.ibm.bsf.util.BSFEngineImpl
source
- the file name of the expression; not used.lineNo
- the line number in the file; not used.columnNo
- the column number in the file; not used.script
- the expression; should be a String.public void exec(java.lang.String source, int lineNo, int columnNo, java.lang.Object script) throws com.ibm.bsf.BSFException
exec
in class com.ibm.bsf.util.BSFEngineImpl
source
- the file name of the expression; not used.lineNo
- the line number in the file; not used.columnNo
- the column number in the file; not used.script
- the script code; should be a String.public java.lang.Object call(java.lang.Object object, java.lang.String fxn, java.lang.Object[] args) throws com.ibm.bsf.BSFException
call
in class com.ibm.bsf.util.BSFEngineImpl
object
- is the name of the object; not used.fxn
- the function name.args
- the arguments.public void declareBean(com.ibm.bsf.BSFDeclaredBean bean) throws com.ibm.bsf.BSFException
declareBean
in class com.ibm.bsf.util.BSFEngineImpl
public void undeclareBean(com.ibm.bsf.BSFDeclaredBean bean) throws com.ibm.bsf.BSFException
undeclareBean
in class com.ibm.bsf.util.BSFEngineImpl