org.apache.bsf.engines.javaclass
Class JavaClassEngine
java.lang.Object
org.apache.bsf.util.BSFEngineImpl
org.apache.bsf.engines.javaclass.JavaClassEngine
- All Implemented Interfaces:
- BSFEngine, java.util.EventListener, java.beans.PropertyChangeListener
- public class JavaClassEngine
- extends BSFEngineImpl
This is the interface to scripts consisting of Java objects from the
Bean Scripting Framework.
- Author:
- Sanjiva Weerawarana
Method Summary |
java.lang.Object |
call(java.lang.Object object,
java.lang.String method,
java.lang.Object[] args)
call the named method of the given object. |
java.lang.Object |
eval(java.lang.String source,
int lineNo,
int columnNo,
java.lang.Object oscript)
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 |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JavaClassEngine
public JavaClassEngine()
call
public java.lang.Object call(java.lang.Object object,
java.lang.String method,
java.lang.Object[] args)
throws BSFException
- 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
public java.lang.Object eval(java.lang.String source,
int lineNo,
int columnNo,
java.lang.Object oscript)
throws BSFException
- 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.