Package org.apache.bsf.engines.jacl
Class JaclEngine
java.lang.Object
org.apache.bsf.util.BSFEngineImpl
org.apache.bsf.engines.jacl.JaclEngine
- All Implemented Interfaces:
PropertyChangeListener,EventListener,BSFEngine
This is the interface to Scriptics's Jacl (Tcl) from the
Bean Scripting Framework.
- Author:
- Sanjiva Weerawarana
-
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.voiddeclareBean(BSFDeclaredBean bean) Declare a beanThis is used by an application to evaluate a string containing some expression.voidinitialize(BSFManager mgr, String lang, Vector declaredBeans) Initialize the engine.voidundeclareBean(BSFDeclaredBean bean) Undeclare a previously declared bean.Methods inherited from class org.apache.bsf.util.BSFEngineImpl
apply, compileApply, compileExpr, compileScript, exec, iexec, propertyChange, terminate
-
Constructor Details
-
JaclEngine
public JaclEngine()
-
-
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:
method- 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.obj- object on which to make the call- Throws:
BSFException- if anything goes wrong while eval'ing a BSFException is thrown. The reason indicates the problem.
-
declareBean
Declare a bean- Specified by:
declareBeanin interfaceBSFEngine- Overrides:
declareBeanin classBSFEngineImpl- Parameters:
bean- the bean to declare- Throws:
BSFException- if the engine cannot do this operation
-
eval
This is used by an application to evaluate a string containing some expression.- 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 exproscript- the expression to evaluate- Throws:
BSFException- if anything goes wrong while eval'ing a BSFException is thrown. The reason indicates the problem.
-
initialize
Initialize the engine.- Specified by:
initializein interfaceBSFEngine- Overrides:
initializein classBSFEngineImpl- Parameters:
mgr- The BSFManager that's hosting this engine.lang- 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.- Throws:
BSFException- if anything goes wrong while init'ing a BSFException is thrown. The reason indicates the problem.
-
undeclareBean
Undeclare a previously declared bean.- Specified by:
undeclareBeanin interfaceBSFEngine- Overrides:
undeclareBeanin classBSFEngineImpl- Parameters:
bean- the bean to undeclare- Throws:
BSFException- if the engine cannot do this operation
-