Package org.apache.bsf.test
Class fakeEngine
java.lang.Object
org.apache.bsf.util.BSFEngineImpl
org.apache.bsf.test.fakeEngine
- All Implemented Interfaces:
PropertyChangeListener,EventListener,BSFEngine
-
Field Summary
Fields inherited from class org.apache.bsf.util.BSFEngineImpl
classLoader, classPath, declaredBeans, lang, mgr, tempDir -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThis is used by an application to call into the scripting engine to make a function/method call.This is used by an application to evaluate an expression.voidDefault impl of execute - calls eval and ignores the result.voidDefault impl of interactive execution - calls eval and ignores the result.voidGraceful terminationMethods inherited from class org.apache.bsf.util.BSFEngineImpl
apply, compileApply, compileExpr, compileScript, declareBean, initialize, propertyChange, undeclareBean
-
Constructor Details
-
fakeEngine
public fakeEngine()
-
-
Method Details
-
call
Description copied from interface:BSFEngineThis is used by an application to call into the scripting engine to make a function/method call. The "object" argument is the object whose method is to be called, if that applies. For non-OO languages, this is typically ignored and should be given as null. For pretend-OO languages such as VB, this would be the (String) name of the object. The arguments are given in the args array.- Parameters:
object- object on which to make the callmethod- name of the method / procedure to callargs- the arguments to be given to the procedure- Throws:
BSFException- if anything goes wrong while eval'ing a BSFException is thrown. The reason indicates the problem.
-
eval
Description copied from interface:BSFEngineThis is used by an application to evaluate an expression. The expression may be string or some other type, depending on the language. (For example, for BML it'll be an org.w3c.dom.Element object.)- Parameters:
source- (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 exprexpr- the expression to evaluate- Throws:
BSFException- if anything goes wrong while eval'ing a BSFException is thrown. The reason indicates the problem.
-
iexec
Description copied from class:BSFEngineImplDefault impl of interactive execution - calls eval and ignores the result.- Specified by:
iexecin interfaceBSFEngine- Overrides:
iexecin classBSFEngineImpl- Parameters:
source- (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 execute- Throws:
BSFException- if anything goes wrong while exec'ing a BSFException is thrown. The reason indicates the problem.
-
exec
Description copied from class:BSFEngineImplDefault impl of execute - calls eval and ignores the result.- Specified by:
execin interfaceBSFEngine- Overrides:
execin classBSFEngineImpl- Parameters:
source- (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 execute- Throws:
BSFException- if anything goes wrong while exec'ing a BSFException is thrown. The reason indicates the problem.
-
terminate
public void terminate()Description copied from interface:BSFEngineGraceful termination- Specified by:
terminatein interfaceBSFEngine- Overrides:
terminatein classBSFEngineImpl
-