public class ActiveScriptEngine extends BSFEngineImpl implements JavaBeanAddEventListener
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
lang |
classLoader, classPath, dbgmgr, declaredBeans, mgr, tempDir| Constructor and Description |
|---|
ActiveScriptEngine() |
| Modifier and Type | Method and Description |
|---|---|
void |
addEventListener(java.lang.Object bean,
java.lang.String event,
java.lang.String filter,
java.lang.String script)
add an event listener
|
int |
bindMember(java.lang.Object target,
java.lang.String name,
short bindType)
Binds a method to an integer so it can be later referenced to invoke the method via callMethod.
|
java.lang.Object |
call(java.lang.Object object,
java.lang.String method,
java.lang.Object[] args)
Return an object from an extension.
|
java.lang.Object |
callMethod(java.lang.Object bean,
int methodID,
java.lang.Object[] args)
Invokes the method assocaited with methodID on the bean with parameters in the array args.
|
java.lang.Object |
createBean(java.lang.Object[] args)
createBean
|
static java.lang.Throwable |
createBSFException(int reason,
java.lang.String msg,
java.lang.Throwable t) |
void |
declareBean(BSFDeclaredBean bean)
Declare a bean after the engine has been started.
|
java.lang.Object |
eval(java.lang.String source,
int lineNo,
int columnNo,
java.lang.Object oscript)
This is used by an application to evaluate a string containing
some expression.
|
void |
exec(java.lang.String source,
int lineNo,
int columnNo,
java.lang.Object script)
This is used by an application to execute a string containing
a script to execute.
|
protected void |
finalize() |
void |
initialize(BSFManager mgr,
java.lang.String language,
java.util.Vector declaredBeans)
initialize the engine; called right after construction by
the manager.
|
protected boolean |
isCaseSensitive() |
protected boolean |
isJScript() |
protected boolean |
isPerlScript() |
protected boolean |
isVBScript() |
java.lang.Object |
lookupBean(java.lang.String name)
lookupBean
|
void |
setEvalRet(java.lang.Object ret) |
void |
terminate()
Graceful termination
|
void |
undeclareBean(BSFDeclaredBean bean)
Undeclare a previously declared bean.
|
apply, compileApply, compileExpr, compileScript, disconnectedDebuggerNotify, getSpecificDebuggingInterface, placeBreakpointAtLine, placeBreakpointAtOffset, propertyChange, removeBreakpoint, setEntryExitpublic void addEventListener(java.lang.Object bean,
java.lang.String event,
java.lang.String filter,
java.lang.String script)
throws BSFException
addEventListener in interface JavaBeanAddEventListenerBSFExceptionpublic final int bindMember(java.lang.Object target,
java.lang.String name,
short bindType)
throws java.lang.Exception
java.lang.Exceptionpublic java.lang.Object call(java.lang.Object object,
java.lang.String method,
java.lang.Object[] args)
throws BSFException
call in interface BSFEnginemethod - The name of the method to call.args - an array of arguments to be
passed to the extension, which may be either
Vectors of Nodes, or Strings.object - object on which to make the callBSFException - if anything goes wrong while eval'ing a
BSFException is thrown. The reason indicates the problem.public final java.lang.Object callMethod(java.lang.Object bean,
int methodID,
java.lang.Object[] args)
throws java.lang.Exception
java.lang.Exceptionpublic final java.lang.Object createBean(java.lang.Object[] args)
throws BSFException
BSFExceptionpublic static final java.lang.Throwable createBSFException(int reason,
java.lang.String msg,
java.lang.Throwable t)
public final void declareBean(BSFDeclaredBean bean) throws BSFException
declareBean in interface BSFEnginedeclareBean in class BSFEngineImplbean - the bean to declareBSFException - if the engine cannot do this operationpublic java.lang.Object eval(java.lang.String source,
int lineNo,
int columnNo,
java.lang.Object oscript)
throws BSFException
eval in interface BSFEnginesource - (context info) the source of this expression
(e.g., filename)lineNo - (context info) the line number in source for exprcolumnNo - (context info) the column number in source for exproscript - the expression to evaluateBSFException - if anything goes wrong while eval'ing a
BSFException is thrown. The reason indicates the problem.public void exec(java.lang.String source,
int lineNo,
int columnNo,
java.lang.Object script)
throws BSFException
exec in interface BSFEngineexec in class BSFEngineImplsource - (context info) the source of this expression
(e.g., filename)lineNo - (context info) the line number in source for exprcolumnNo - (context info) the column number in source for exprscript - the script to executeBSFException - if anything goes wrong while exec'ing a
BSFException is thrown. The reason indicates the problem.protected void finalize()
throws java.lang.Throwable
finalize in class java.lang.Objectjava.lang.Throwablepublic void initialize(BSFManager mgr, java.lang.String language, java.util.Vector declaredBeans) throws BSFException
BSFEngineImplinitialize in interface BSFEngineinitialize in class BSFEngineImplmgr - The BSFManager that's hosting this engine.language - Language string which this engine is handling.declaredBeans - Vector of BSFDeclaredObject containing beans
that should be declared into the language runtime at init
time as best as possible.BSFException - if anything goes wrong while init'ing a
BSFException is thrown. The reason indicates the problem.protected final boolean isCaseSensitive()
protected final boolean isJScript()
protected final boolean isPerlScript()
protected final boolean isVBScript()
public final java.lang.Object lookupBean(java.lang.String name)
public final void setEvalRet(java.lang.Object ret)
public void terminate()
BSFEngineterminate in interface BSFEngineterminate in class BSFEngineImplpublic void undeclareBean(BSFDeclaredBean bean) throws BSFException
undeclareBean in interface BSFEngineundeclareBean in class BSFEngineImplbean - the bean to undeclareBSFException - if the engine cannot do this operation