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`

public class JavaClassEngine extends BSFEngineImpl
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
  Constructor
  Description
  `JavaClassEngine()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Object`
  `call(Object object, String method, Object[] args)`
  call the named method of the given object.
  `Object`
  `eval(String source, int lineNo, int columnNo, 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`

- ## Constructor Details

  - ### JavaClassEngine

    public JavaClassEngine()

- ## Method Details

  - ### call

    public Object call(Object object, String method, 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 call
      `method` - name of the method / procedure to call
      `args` - 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 Object eval(String source, int lineNo, int columnNo, 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 expr
      `columnNo` - (context info) the column number in source for expr
      `oscript` - the expression to evaluate
    Throws:
      `BSFException` - if anything goes wrong while eval'ing a BSFException is thrown. The reason indicates the problem.