Overview | Package | Class | Deprecated | Index | Help
| Groovy 1.7.6
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.codehaus.groovy.bsf
[Java] Class GroovyEngine

    java.lang.Object
      org.apache.bsf.util.BSFEngineImpl
          org.codehaus.groovy.bsf.GroovyEngine

    public class GroovyEngine
    extends org.apache.bsf.util.BSFEngineImpl

A BSF Engine for the Groovy scripting language.

It's derived from the Jython / JPython engine

Authors:
  James Strachan

Field Summary
`protected GroovyShell` | `shell`

Method Summary
`Object` | `apply(String source, int lineNo, int columnNo, Object funcBody, Vector paramNames, Vector arguments)` Allow an anonymous function to be declared and invoked
`Object` | `call(Object object, String method, Object[] args)` Call the named method of the given object.
`void` | `declareBean(org.apache.bsf.BSFDeclaredBean bean)` Declare a bean
`Object` | `eval(String source, int lineNo, int columnNo, Object script)` Evaluate an expression.
`void` | `exec(String source, int lineNo, int columnNo, Object script)` Execute a script.
`protected GroovyShell` | `getEvalShell()` @return a newly created GroovyShell using the same variable scope but a new class loader
`void` | `initialize(org.apache.bsf.BSFManager mgr, String lang, Vector declaredBeans)` Initialize the engine.
`void` | `undeclareBean(org.apache.bsf.BSFDeclaredBean bean)` Undeclare a previously declared bean.

Methods inherited from class org.apache.bsf.util.BSFEngineImpl
org.apache.bsf.util.BSFEngineImpl#initialize(org.apache.bsf.BSFManager, java.lang.String, java.util.Vector), org.apache.bsf.util.BSFEngineImpl#exec(java.lang.String, int, int, java.lang.Object), org.apache.bsf.util.BSFEngineImpl#propertyChange(java.beans.PropertyChangeEvent), org.apache.bsf.util.BSFEngineImpl#apply(java.lang.String, int, int, java.lang.Object, java.util.Vector, java.util.Vector), org.apache.bsf.util.BSFEngineImpl#compileApply(java.lang.String, int, int, java.lang.Object, java.util.Vector, java.util.Vector, org.apache.bsf.util.CodeBuffer), org.apache.bsf.util.BSFEngineImpl#compileExpr(java.lang.String, int, int, java.lang.Object, org.apache.bsf.util.CodeBuffer), org.apache.bsf.util.BSFEngineImpl#compileScript(java.lang.String, int, int, java.lang.Object, org.apache.bsf.util.CodeBuffer), org.apache.bsf.util.BSFEngineImpl#declareBean(org.apache.bsf.BSFDeclaredBean), org.apache.bsf.util.BSFEngineImpl#iexec(java.lang.String, int, int, java.lang.Object), org.apache.bsf.util.BSFEngineImpl#terminate(), org.apache.bsf.util.BSFEngineImpl#undeclareBean(org.apache.bsf.BSFDeclaredBean), org.apache.bsf.util.BSFEngineImpl#wait(long), org.apache.bsf.util.BSFEngineImpl#wait(long, int), org.apache.bsf.util.BSFEngineImpl#wait(), org.apache.bsf.util.BSFEngineImpl#equals(java.lang.Object), org.apache.bsf.util.BSFEngineImpl#toString(), org.apache.bsf.util.BSFEngineImpl#hashCode(), org.apache.bsf.util.BSFEngineImpl#getClass(), org.apache.bsf.util.BSFEngineImpl#notify(), org.apache.bsf.util.BSFEngineImpl#notifyAll(), org.apache.bsf.util.BSFEngineImpl#eval(java.lang.String, int, int, java.lang.Object), org.apache.bsf.util.BSFEngineImpl#call(java.lang.Object, java.lang.String, [Ljava.lang.Object;)

Methods inherited from class Object
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll

Field Detail

### shell

    protected GroovyShell shell

Method Detail

### apply

    public Object apply(String source, int lineNo, int columnNo, Object funcBody, Vector paramNames, Vector arguments)

  Allow an anonymous function to be declared and invoked

### call

    public Object call(Object object, String method, Object[] args)

  Call the named method of the given object.

### declareBean

    public void declareBean(org.apache.bsf.BSFDeclaredBean bean)

  Declare a bean

### eval

    public Object eval(String source, int lineNo, int columnNo, Object script)

  Evaluate an expression.

### exec

    public void exec(String source, int lineNo, int columnNo, Object script)

  Execute a script.

### getEvalShell

    protected GroovyShell getEvalShell()

  Returns:
    a newly created GroovyShell using the same variable scope but a new class loader

### initialize

    public void initialize(org.apache.bsf.BSFManager mgr, String lang, Vector declaredBeans)

  Initialize the engine.

### undeclareBean

    public void undeclareBean(org.apache.bsf.BSFDeclaredBean bean)

  Undeclare a previously declared bean.

Copyright © 2003-2010 The Codehaus. All rights reserved.