public class GroovyEngine
extends org.apache.bsf.util.BSFEngineImpl
It's inspired from the Jython engine
Modifier and Type | Field and Description |
---|---|
protected GroovyShell |
shell |
Constructor and Description |
---|
GroovyEngine() |
Modifier and Type | Method and Description |
---|---|
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() |
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.
|
protected GroovyShell shell
public Object apply(String source, int lineNo, int columnNo, Object funcBody, Vector paramNames, Vector arguments) throws org.apache.bsf.BSFException
apply
in interface org.apache.bsf.BSFEngine
apply
in class org.apache.bsf.util.BSFEngineImpl
org.apache.bsf.BSFException
public Object call(Object object, String method, Object[] args) throws org.apache.bsf.BSFException
org.apache.bsf.BSFException
public Object eval(String source, int lineNo, int columnNo, Object script) throws org.apache.bsf.BSFException
org.apache.bsf.BSFException
public void exec(String source, int lineNo, int columnNo, Object script) throws org.apache.bsf.BSFException
exec
in interface org.apache.bsf.BSFEngine
exec
in class org.apache.bsf.util.BSFEngineImpl
org.apache.bsf.BSFException
public void initialize(org.apache.bsf.BSFManager mgr, String lang, Vector declaredBeans) throws org.apache.bsf.BSFException
initialize
in interface org.apache.bsf.BSFEngine
initialize
in class org.apache.bsf.util.BSFEngineImpl
org.apache.bsf.BSFException
public void declareBean(org.apache.bsf.BSFDeclaredBean bean) throws org.apache.bsf.BSFException
declareBean
in interface org.apache.bsf.BSFEngine
declareBean
in class org.apache.bsf.util.BSFEngineImpl
org.apache.bsf.BSFException
public void undeclareBean(org.apache.bsf.BSFDeclaredBean bean) throws org.apache.bsf.BSFException
undeclareBean
in interface org.apache.bsf.BSFEngine
undeclareBean
in class org.apache.bsf.util.BSFEngineImpl
org.apache.bsf.BSFException
protected GroovyShell getEvalShell()