groovy.util
Class GroovyScriptEngine
java.lang.Object
groovy.util.GroovyScriptEngine
- All Implemented Interfaces:
- ResourceConnector
- public class GroovyScriptEngine
- extends Object
- implements ResourceConnector
- Author:
- sam
To change the template for this generated type comment go to Window -
Preferences - Java - Code Generation - Code and Comments
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GroovyScriptEngine
public GroovyScriptEngine(URL[] roots)
- The groovy script engine will run groovy scripts and reload them and
their dependencies when they are modified. This is useful for embedding
groovy in other containers like games and application servers.
- Parameters:
roots
- This an array of URLs where Groovy scripts will be stored. They should
be layed out using their package structure like Java classes
GroovyScriptEngine
public GroovyScriptEngine(String[] args)
throws IOException
GroovyScriptEngine
public GroovyScriptEngine(String arg)
throws IOException
GroovyScriptEngine
public GroovyScriptEngine(ResourceConnector rc)
main
public static void main(String[] args)
throws Exception
- Simple testing harness for the GSE. Enter script roots as arguments and
then input script names to run them.
- Parameters:
args
-
- Throws:
Exception
getResourceConnection
public URLConnection getResourceConnection(String resourceName)
throws ResourceException
- Specified by:
getResourceConnection
in interface ResourceConnector
- Throws:
ResourceException
run
public String run(String script,
String argument)
throws ResourceException,
ScriptException
- Throws:
ResourceException
ScriptException
run
public Object run(String script,
Binding binding)
throws ResourceException,
ScriptException
- Throws:
ResourceException
ScriptException
Copyright © 2003-2005 The Codehaus. All Rights Reserved.