Class fakeEngine

java.lang.Object
org.apache.bsf.util.BSFEngineImpl
org.apache.bsf.test.fakeEngine
All Implemented Interfaces:
PropertyChangeListener, EventListener, BSFEngine

public class fakeEngine extends BSFEngineImpl
  • Constructor Details

    • fakeEngine

      public fakeEngine()
  • Method Details

    • call

      public Object call(Object object, String method, Object[] args) throws BSFException
      Description copied from interface: BSFEngine
      This 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 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 expr) throws BSFException
      Description copied from interface: BSFEngine
      This 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 expr
      columnNo - (context info) the column number in source for expr
      expr - the expression to evaluate
      Throws:
      BSFException - if anything goes wrong while eval'ing a BSFException is thrown. The reason indicates the problem.
    • iexec

      public void iexec(String source, int lineNo, int columnNo, Object script) throws BSFException
      Description copied from class: BSFEngineImpl
      Default impl of interactive execution - calls eval and ignores the result.
      Specified by:
      iexec in interface BSFEngine
      Overrides:
      iexec in class BSFEngineImpl
      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
      script - the script to execute
      Throws:
      BSFException - if anything goes wrong while exec'ing a BSFException is thrown. The reason indicates the problem.
    • exec

      public void exec(String source, int lineNo, int columnNo, Object script) throws BSFException
      Description copied from class: BSFEngineImpl
      Default impl of execute - calls eval and ignores the result.
      Specified by:
      exec in interface BSFEngine
      Overrides:
      exec in class BSFEngineImpl
      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
      script - 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: BSFEngine
      Graceful termination
      Specified by:
      terminate in interface BSFEngine
      Overrides:
      terminate in class BSFEngineImpl