Package org.apache.bsf.engines.javaclass
Class JavaClassEngine
java.lang.Object
org.apache.bsf.util.BSFEngineImpl
org.apache.bsf.engines.javaclass.JavaClassEngine
- All Implemented Interfaces:
PropertyChangeListener,EventListener,BSFEngine
This is the interface to scripts consisting of Java objects 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 TypeMethodDescriptioncall the named method of the given object.This is used by an application to evaluate an object containing some expression - clearly not possible for compiled code ..Methods inherited from class org.apache.bsf.util.BSFEngineImpl
apply, compileApply, compileExpr, compileScript, declareBean, exec, iexec, initialize, propertyChange, terminate, undeclareBean
-
Constructor Details
-
JavaClassEngine
public JavaClassEngine()
-
-
Method Details
-
call
call the named method of the given object. If object is an instance of Class, then the call is a static call on that object. If not, its an instance method call or a static call (as per Java) on the given object.- 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
This is used by an application to evaluate an object containing some expression - clearly not possible for compiled code ..- 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.
-