bsh.util
Class BeanShellBSFEngine
java.lang.Object
org.apache.bsf.util.BSFEngineImpl
bsh.util.BeanShellBSFEngine
- All Implemented Interfaces:
- java.beans.PropertyChangeListener, java.util.EventListener, org.apache.bsf.BSFEngine
public class BeanShellBSFEngine
- extends org.apache.bsf.util.BSFEngineImpl
This is the BeanShell adapter for IBM's Bean Scripting Famework.
It is an implementation of the BSFEngine class, allowing BSF aware
applications to use BeanShell as a scripting language.
I believe this implementation is complete (with some hesitation about the
the usefullness of the compileXXX() style methods - provided by the base
utility class).
| Fields inherited from class org.apache.bsf.util.BSFEngineImpl |
classLoader, classPath, dbgmgr, declaredBeans, lang, mgr, tempDir |
|
Method Summary |
java.lang.Object |
apply(java.lang.String source,
int lineNo,
int columnNo,
java.lang.Object funcBody,
java.util.Vector namesVec,
java.util.Vector argsVec)
This is an implementation of the BSF apply() method. |
java.lang.Object |
call(java.lang.Object object,
java.lang.String name,
java.lang.Object[] args)
Invoke method name on the specified bsh scripted object. |
void |
declareBean(org.apache.bsf.BSFDeclaredBean bean)
|
java.lang.Object |
eval(java.lang.String source,
int lineNo,
int columnNo,
java.lang.Object expr)
|
void |
exec(java.lang.String source,
int lineNo,
int columnNo,
java.lang.Object script)
|
void |
initialize(org.apache.bsf.BSFManager mgr,
java.lang.String lang,
java.util.Vector declaredBeans)
|
void |
setDebug(boolean debug)
|
void |
terminate()
|
void |
undeclareBean(org.apache.bsf.BSFDeclaredBean bean)
|
| Methods inherited from class org.apache.bsf.util.BSFEngineImpl |
compileApply, compileExpr, compileScript, disconnectedDebuggerNotify, getSpecificDebuggingInterface, placeBreakpointAtLine, placeBreakpointAtOffset, propertyChange, removeBreakpoint, setEntryExit |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BeanShellBSFEngine
public BeanShellBSFEngine()
initialize
public void initialize(org.apache.bsf.BSFManager mgr,
java.lang.String lang,
java.util.Vector declaredBeans)
throws org.apache.bsf.BSFException
- Specified by:
initialize in interface org.apache.bsf.BSFEngine- Overrides:
initialize in class org.apache.bsf.util.BSFEngineImpl
- Throws:
org.apache.bsf.BSFException
setDebug
public void setDebug(boolean debug)
call
public java.lang.Object call(java.lang.Object object,
java.lang.String name,
java.lang.Object[] args)
throws org.apache.bsf.BSFException
- Invoke method name on the specified bsh scripted object.
The object may be null to indicate the global namespace of the
interpreter.
- Specified by:
call in interface org.apache.bsf.BSFEngine- Specified by:
call in class org.apache.bsf.util.BSFEngineImpl
- Parameters:
object - may be null for the global namespace.
- Throws:
org.apache.bsf.BSFException
apply
public java.lang.Object apply(java.lang.String source,
int lineNo,
int columnNo,
java.lang.Object funcBody,
java.util.Vector namesVec,
java.util.Vector argsVec)
throws org.apache.bsf.BSFException
- This is an implementation of the BSF apply() method.
It exectutes the funcBody text in an "anonymous" method call with
arguments.
- Specified by:
apply in interface org.apache.bsf.BSFEngine- Overrides:
apply in class org.apache.bsf.util.BSFEngineImpl
- Throws:
org.apache.bsf.BSFException
eval
public java.lang.Object eval(java.lang.String source,
int lineNo,
int columnNo,
java.lang.Object expr)
throws org.apache.bsf.BSFException
- Specified by:
eval in interface org.apache.bsf.BSFEngine- Specified by:
eval in class org.apache.bsf.util.BSFEngineImpl
- Throws:
org.apache.bsf.BSFException
exec
public void exec(java.lang.String source,
int lineNo,
int columnNo,
java.lang.Object script)
throws org.apache.bsf.BSFException
- Specified by:
exec in interface org.apache.bsf.BSFEngine- Overrides:
exec in class org.apache.bsf.util.BSFEngineImpl
- Throws:
org.apache.bsf.BSFException
declareBean
public void declareBean(org.apache.bsf.BSFDeclaredBean bean)
throws org.apache.bsf.BSFException
- Specified by:
declareBean in interface org.apache.bsf.BSFEngine- Overrides:
declareBean in class org.apache.bsf.util.BSFEngineImpl
- Throws:
org.apache.bsf.BSFException
undeclareBean
public void undeclareBean(org.apache.bsf.BSFDeclaredBean bean)
throws org.apache.bsf.BSFException
- Specified by:
undeclareBean in interface org.apache.bsf.BSFEngine- Overrides:
undeclareBean in class org.apache.bsf.util.BSFEngineImpl
- Throws:
org.apache.bsf.BSFException
terminate
public void terminate()
- Specified by:
terminate in interface org.apache.bsf.BSFEngine- Overrides:
terminate in class org.apache.bsf.util.BSFEngineImpl