org.norther.tammi.core.scripter.groovy
Class GroovyEngine
java.lang.Object
org.norther.tammi.core.scripter.lang.AbstractEngine
org.norther.tammi.core.scripter.lang.AbstractInterpreter
org.norther.tammi.core.scripter.groovy.GroovyEngine
- All Implemented Interfaces:
- PropertyChangeListener, Serializable, EventListener, org.apache.bsf.BSFEngine, Interpreter, ScriptEngine
public class GroovyEngine
- extends AbstractInterpreter
- implements Serializable
A groovy interpreter engine to compile, evaluate and execute Java scripts and
expressions.
- Author:
- Ilkka Priha
- See Also:
- Serialized Form
|
Method Summary |
Object |
apply(String source,
int lineNo,
int columnNo,
Object funcBody,
Vector paramNames,
Vector arguments)
|
Object |
call(Object object,
String method,
Object[] args)
|
void |
declareBean(org.apache.bsf.BSFDeclaredBean bean)
|
Object |
eval(String source,
int lineNo,
int columnNo,
Object script)
|
void |
exec(String source,
int lineNo,
int columnNo,
Object script)
|
protected Interpreter |
getInterpreter()
Gets the adapted interpreter. |
void |
reinitialize(String lang,
Vector beans)
Reinitializes the engine by clearing existing declarations. |
void |
reset()
Resets this interpreter. |
void |
terminate()
|
void |
undeclareBean(org.apache.bsf.BSFDeclaredBean bean)
|
| Methods inherited from class org.norther.tammi.core.scripter.lang.AbstractInterpreter |
addClassPath, addClassURL, defineClass, defineVariable, defineVariable, getClassLoader, getClassNames, getVariable, getVariableClass, getVariableNames, interpret, interpret, interpret, interpret, interpret, isDefined, loadClass, setVariable |
| Methods inherited from class org.norther.tammi.core.scripter.lang.AbstractEngine |
compileApply, compileExpr, compileScript, disconnectedDebuggerNotify, getClassPath, getDebugManager, getDeclaredBeans, getInitializer, getLanguage, getSpecificDebuggingInterface, getTempDirectory, initialize, isInitialized, placeBreakpointAtLine, placeBreakpointAtOffset, propertyChange, removeBreakpoint, setClassLoader, setClassPath, setEntryExit, setInitializer, setTempDirectory |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GroovyEngine
public GroovyEngine()
- Constructs a new engine.
reinitialize
public void reinitialize(String lang,
Vector beans)
throws org.apache.bsf.BSFException
- Description copied from interface:
ScriptEngine
- Reinitializes the engine by clearing existing declarations.
- Specified by:
reinitialize in interface ScriptEngine- Overrides:
reinitialize in class AbstractEngine
- Parameters:
lang - the language.beans - declared beans.
- Throws:
org.apache.bsf.BSFException - on errors.
declareBean
public void declareBean(org.apache.bsf.BSFDeclaredBean bean)
throws org.apache.bsf.BSFException
- Specified by:
declareBean in interface org.apache.bsf.BSFEngine
- Throws:
org.apache.bsf.BSFException
undeclareBean
public void undeclareBean(org.apache.bsf.BSFDeclaredBean bean)
throws org.apache.bsf.BSFException
- Specified by:
undeclareBean in interface org.apache.bsf.BSFEngine
- Throws:
org.apache.bsf.BSFException
call
public Object call(Object object,
String method,
Object[] args)
throws org.apache.bsf.BSFException
- Specified by:
call in interface org.apache.bsf.BSFEngine
- Throws:
org.apache.bsf.BSFException
apply
public Object apply(String source,
int lineNo,
int columnNo,
Object funcBody,
Vector paramNames,
Vector arguments)
throws org.apache.bsf.BSFException
- Specified by:
apply in interface org.apache.bsf.BSFEngine
- Throws:
org.apache.bsf.BSFException
exec
public void exec(String source,
int lineNo,
int columnNo,
Object script)
throws org.apache.bsf.BSFException
- Specified by:
exec in interface org.apache.bsf.BSFEngine
- Throws:
org.apache.bsf.BSFException
eval
public Object eval(String source,
int lineNo,
int columnNo,
Object script)
throws org.apache.bsf.BSFException
- Specified by:
eval in interface org.apache.bsf.BSFEngine
- Throws:
org.apache.bsf.BSFException
terminate
public void terminate()
- Specified by:
terminate in interface org.apache.bsf.BSFEngine- Overrides:
terminate in class AbstractEngine
reset
public void reset()
- Description copied from interface:
Interpreter
- Resets this interpreter.
- Specified by:
reset in interface Interpreter- Overrides:
reset in class AbstractInterpreter
getInterpreter
protected Interpreter getInterpreter()
- Description copied from class:
AbstractInterpreter
- Gets the adapted interpreter.
- Specified by:
getInterpreter in class AbstractInterpreter
- Returns:
- the interpreter.
Copyright © 2004 The Norther Organization. All rights reserved.