Modifier and Type | Field and Description |
---|---|
protected Engine |
engine
the engine that powers this Grengine.
|
protected Loader |
loader
the default loader instance, which is implicitly used when no specific loader is indicated.
|
protected SourceFactory |
sourceFactory
the source factory used to create instances of
Source ,
often implicitly from script text, file or URL. |
Modifier | Constructor and Description |
---|---|
protected |
BaseGrengine()
constructor.
|
Modifier and Type | Method and Description |
---|---|
ClassLoader |
asClassLoader()
returns a new class loader based on the engine and its default attached loader.
|
ClassLoader |
asClassLoader(Loader loader)
returns a new class loader based on the engine and the given loader.
|
groovy.lang.Binding |
binding()
creates an empty binding.
|
groovy.lang.Binding |
binding(String key,
Object value)
creates a binding using the given key and value.
|
groovy.lang.Binding |
binding(String key1,
Object value1,
String key2,
Object value2)
creates a binding using the given keys and values.
|
groovy.lang.Binding |
binding(String key1,
Object value1,
String key2,
Object value2,
String key3,
Object value3)
creates a binding using the given keys and values.
|
groovy.lang.Binding |
binding(String key1,
Object value1,
String key2,
Object value2,
String key3,
Object value3,
String key4,
Object value4)
creates a binding using the given keys and values.
|
groovy.lang.Binding |
binding(String key1,
Object value1,
String key2,
Object value2,
String key3,
Object value3,
String key4,
Object value4,
String key5,
Object value5,
Object... moreKeyValuePairs)
creates a binding using the given keys and values.
|
void |
close()
release metadata for all classed ever loaded using this engine.
|
groovy.lang.Script |
create(Class<?> clazz)
creates an instance of
Script from the given class. |
groovy.lang.Script |
create(File file)
creates a script (default loader, file-based source),
compiling and loading first if necessary.
|
groovy.lang.Script |
create(Loader loader,
File file)
creates a script (given loader, file-based source),
compiling and loading first if necessary.
|
groovy.lang.Script |
create(Loader loader,
Source source)
creates a script (given loader, given source),
compiling and loading first if necessary.
|
groovy.lang.Script |
create(Loader loader,
String text)
creates a script (given loader, text-based source),
compiling and loading first if necessary.
|
groovy.lang.Script |
create(Loader loader,
String text,
String desiredClassName)
creates a script (given loader, text-based source with desired class name),
compiling and loading first if necessary.
|
groovy.lang.Script |
create(Loader loader,
URL url)
creates a script (given loader, URL-based source),
compiling and loading first if necessary.
|
groovy.lang.Script |
create(Source source)
creates a script (default loader, given source),
compiling and loading first if necessary.
|
groovy.lang.Script |
create(String text)
creates a script (default loader, text-based source),
compiling and loading first if necessary.
|
groovy.lang.Script |
create(String text,
String desiredClassName)
creates a script (default loader, text-based source with desired class name),
compiling and loading first if necessary.
|
groovy.lang.Script |
create(URL url)
creates a script (default loader, URL-based source),
compiling and loading first if necessary.
|
Engine |
getEngine()
gets the engine.
|
Loader |
getLoader()
gets the default loader instance, which is implicitly used when no specific loader is indicated.
|
SourceFactory |
getSourceFactory()
gets the source factory used to create instances of
Source ,
often implicitly from script text or file or URL. |
Class<?> |
load(File file)
loads a class (default loader, file-based source),
compiling first if necessary.
|
Class<?> |
load(Loader loader,
File file)
loads a class (given loader, file-based source),
compiling first if necessary.
|
Class<?> |
load(Loader loader,
Source source)
loads a class (given loader, given source),
compiling first if necessary.
|
Class<?> |
load(Loader loader,
String text)
loads a class (given loader, text-based source),
compiling first if necessary.
|
Class<?> |
load(Loader loader,
String text,
String desiredClassName)
loads a class (given loader, text-based source with desired class name),
compiling first if necessary.
|
Class<?> |
load(Loader loader,
URL url)
loads a class (given loader, URL-based source),
compiling first if necessary.
|
Class<?> |
load(Source source)
loads a class (default loader, given source),
compiling first if necessary.
|
Class<?> |
load(String text)
loads a class (default loader, text-based source),
compiling first if necessary.
|
Class<?> |
load(String text,
String desiredClassName)
loads a class (default loader, text-based source with desired class name),
compiling first if necessary.
|
Class<?> |
load(URL url)
loads a class (default loader, URL-based source),
compiling first if necessary.
|
abstract Class<?> |
loadClass(Loader loader,
Source source,
String name)
loads a class with the given name and from the given source from the given loader.
|
abstract Class<?> |
loadClass(Loader loader,
String name)
loads a class by name from the given loader.
|
abstract Class<?> |
loadClass(Source source,
String name)
loads a class with the given name and from the given source from the default loader.
|
abstract Class<?> |
loadClass(String name)
loads a class by name from the default loader.
|
abstract Class<?> |
loadMainClass(Loader loader,
Source source)
loads the main class of the given source from the given loader.
|
abstract Class<?> |
loadMainClass(Source source)
loads the main class of the given source from the default loader.
|
Loader |
newAttachedLoader()
creates and gets a new attached loader, backed by the same bytecode
as all other shared loaders created by this engine
and automatically updated if code layers are set.
|
Loader |
newDetachedLoader()
creates and gets a new detached loader, backed initially by the same
bytecode as all attached loaders created by this engine,
but not updated if code layers are set.
|
Object |
run(File file)
creates and runs a script (default loader, file-based source, empty binding),
compiling and loading first if necessary.
|
Object |
run(File file,
groovy.lang.Binding binding)
creates and runs a script (default loader, file-based source, given binding),
compiling and loading first if necessary.
|
Object |
run(File file,
Map<String,Object> bindingMap)
creates and runs a script (default loader, file-based source, given binding),
compiling and loading first if necessary.
|
Object |
run(Loader loader,
File file)
creates and runs a script (given loader, file-based source, empty binding),
compiling and loading first if necessary.
|
Object |
run(Loader loader,
File file,
groovy.lang.Binding binding)
creates and runs a script (given loader, file-based source, given binding),
compiling and loading first if necessary.
|
Object |
run(Loader loader,
File file,
Map<String,Object> bindingMap)
creates and runs a script (given loader, file-based source, given binding),
compiling and loading first if necessary.
|
Object |
run(Loader loader,
Source source)
creates and runs a script (given loader, given source, empty binding),
compiling and loading first if necessary.
|
Object |
run(Loader loader,
Source source,
groovy.lang.Binding binding)
creates and runs a script (given loader, given source, given binding),
compiling and loading first if necessary.
|
Object |
run(Loader loader,
Source source,
Map<String,Object> bindingMap)
creates and runs a script (given loader, given source, given binding),
compiling and loading first if necessary.
|
Object |
run(Loader loader,
String text)
creates and runs a script (given loader, text-based source, empty binding),
compiling and loading first if necessary.
|
Object |
run(Loader loader,
String text,
groovy.lang.Binding binding)
creates and runs a script (given loader, text-based source, given binding),
compiling and loading first if necessary.
|
Object |
run(Loader loader,
String text,
Map<String,Object> bindingMap)
creates and runs a script (given loader, text-based source, given binding),
compiling and loading first if necessary.
|
Object |
run(Loader loader,
String text,
String desiredClassName)
creates and runs a script (given loader, text-based source with desired class name, empty binding),
compiling and loading first if necessary.
|
Object |
run(Loader loader,
String text,
String desiredClassName,
groovy.lang.Binding binding)
creates and runs a script (given loader, text-based source with desired class name, given binding),
compiling and loading first if necessary.
|
Object |
run(Loader loader,
String text,
String desiredClassName,
Map<String,Object> bindingMap)
creates and runs a script (given loader, text-based source with desired class name, given binding),
compiling and loading first if necessary.
|
Object |
run(Loader loader,
URL url)
creates and runs a script (given loader, URL-based source, empty binding),
compiling and loading first if necessary.
|
Object |
run(Loader loader,
URL url,
groovy.lang.Binding binding)
creates and runs a script (given loader, URL-based source, given binding),
compiling and loading first if necessary.
|
Object |
run(Loader loader,
URL url,
Map<String,Object> bindingMap)
creates and runs a script (given loader, URL-based source, given binding),
compiling and loading first if necessary.
|
Object |
run(groovy.lang.Script script)
runs the given script (empty binding).
|
Object |
run(groovy.lang.Script script,
groovy.lang.Binding binding)
runs the given script (given binding).
|
Object |
run(groovy.lang.Script script,
Map<String,Object> bindingMap)
runs the given script (given binding).
|
Object |
run(Source source)
creates and runs a script (default loader, given source, empty binding),
compiling and loading first if necessary.
|
Object |
run(Source source,
groovy.lang.Binding binding)
creates and runs a script (default loader, given source, given binding),
compiling and loading first if necessary.
|
Object |
run(Source source,
Map<String,Object> bindingMap)
creates and runs a script (default loader, given source, given binding),
compiling and loading first if necessary.
|
Object |
run(String text)
creates and runs a script (default loader, text-based source, empty binding),
compiling and loading first if necessary.
|
Object |
run(String text,
groovy.lang.Binding binding)
creates and runs a script (default loader, text-based source, given binding),
compiling and loading first if necessary.
|
Object |
run(String text,
Map<String,Object> bindingMap)
creates and runs a script (default loader, text-based source, given binding),
compiling and loading first if necessary.
|
Object |
run(String text,
String desiredClassName)
creates and runs a script (default loader, text-based source with desired class name, empty binding),
compiling and loading first if necessary.
|
Object |
run(String text,
String desiredClassName,
groovy.lang.Binding binding)
creates and runs a script (default loader, text-based source with desired class name, given binding),
compiling and loading first if necessary.
|
Object |
run(String text,
String desiredClassName,
Map<String,Object> bindingMap)
creates and runs a script (default loader, text-based source with desired class name, given binding),
compiling and loading first if necessary.
|
Object |
run(URL url)
creates and runs a script (default loader, URL-based source, empty binding),
compiling and loading first if necessary.
|
Object |
run(URL url,
groovy.lang.Binding binding)
creates and runs a script (default loader, URL-based source, new binding),
compiling and loading first if necessary.
|
Object |
run(URL url,
Map<String,Object> bindingMap)
creates and runs a script (default loader, URL-based source, given binding),
compiling and loading first if necessary.
|
Source |
source(File file)
gets source from script file.
|
Source |
source(String text)
gets source from script text.
|
Source |
source(String text,
String desiredClassName)
gets source from script text and desired class name.
|
Source |
source(URL url)
gets source from script URL.
|
protected Engine engine
protected SourceFactory sourceFactory
Source
,
often implicitly from script text, file or URL.protected Loader loader
public Engine getEngine()
public Loader getLoader()
Engine.getLoader()
public Loader newAttachedLoader()
public Loader newDetachedLoader()
For example, a web application might create a detached loader for each new HTTP session: A new loader in order to separate static variables of scripts between sessions (security feature); a detached loader in order to keep code layers constant during the lifetime of the session (consistent behavior of Groovy script calls).
public abstract Class<?> loadMainClass(Loader loader, Source source)
Note that if a class with the main class name is available for loading,
but was not compiled as part of a set of Source
that included
the given source, that class will not count for loading.
loader
- loadersource
- sourceCompileException
- if compilation was necessary to load the class and failedLoadException
- if loading failed, including if the class was not foundEngine.loadMainClass(Loader loader, Source source)
public abstract Class<?> loadMainClass(Source source)
Note that if a class with the main class name is available for loading,
but was not compiled as part of a set of Source
that included
the given source, that class will not count for loading.
source
- sourceCompileException
- if compilation was necessary to load the class and failedLoadException
- if loading failed, including if the class was not foundEngine.loadMainClass(Loader loader, Source source)
public abstract Class<?> loadClass(Loader loader, Source source, String name)
Note that if a class with the given class name is available for loading,
but was not compiled as part of a set of Source
that included
the given source, that class will not count for loading.
loader
- loadersource
- sourcename
- class nameCompileException
- if compilation was necessary to load the class and failedLoadException
- if loading failed, including if the class was not foundEngine.loadClass(Loader loader, Source source, String name)
public abstract Class<?> loadClass(Source source, String name)
Note that if a class with the given class name is available for loading,
but was not compiled as part of a set of Source
that included
the given source, that class will not count for loading.
source
- sourcename
- class nameCompileException
- if compilation was necessary to load the class and failedLoadException
- if loading failed, including if the class was not foundEngine.loadClass(Loader loader, Source source, String name)
public abstract Class<?> loadClass(Loader loader, String name)
Note that a top code cache is not searched in this case, because each set of source has its own top loader.
loader
- loadername
- class nameLoadException
- if loading failed, including if the class was not foundEngine.loadClass(Loader loader, String name)
public abstract Class<?> loadClass(String name)
Note that a top code cache is not searched in this case, because each set of source has its own top loader.
name
- class nameLoadException
- if loading failed, including if the class was not foundEngine.loadClass(Loader loader, String name)
public void close()
Allows to remove metadata associated by Groovy (or Java) with a class, which is often necessary to get on-the-fly garbage collection.
Generally call only when really done using this engine and all loaded classes; subsequently trying to use this engine or its classes results generally in undefined behavior.
close
in interface Closeable
close
in interface AutoCloseable
public ClassLoader asClassLoader(Loader loader)
Note that the returned class loader typically does not load classes itself; it just wraps the engine and its loader.
loader
- loaderNullPointerException
- if the loader is nullIllegalArgumentException
- if the loader does not match the enginepublic ClassLoader asClassLoader()
Note that the returned class loader typically does not load classes itself; it just wraps the engine and its loader.
public SourceFactory getSourceFactory()
Source
,
often implicitly from script text or file or URL.public Source source(String text)
text
- script textSourceFactory.fromText(String text)
public Source source(String text, String desiredClassName)
text
- script textdesiredClassName
- desired class nameSourceFactory.fromText(String text, String desiredClassName)
public Source source(File file)
file
- script fileSourceFactory.fromFile(File file)
public Source source(URL url)
url
- script URLSourceFactory.fromUrl(URL url)
public Class<?> load(String text)
text
- script textCompileException
- if compiling failedLoadException
- if loading failedpublic Class<?> load(Loader loader, String text)
loader
- loadertext
- script textCompileException
- if compiling failedLoadException
- if loading failedpublic Class<?> load(String text, String desiredClassName)
text
- script textdesiredClassName
- desired class nameCompileException
- if compiling failedLoadException
- if loading failedpublic Class<?> load(Loader loader, String text, String desiredClassName)
loader
- loadertext
- script textdesiredClassName
- desired class nameCompileException
- if compiling failedLoadException
- if loading failedpublic Class<?> load(File file)
file
- script fileCompileException
- if compiling failedLoadException
- if loading failedpublic Class<?> load(Loader loader, File file)
loader
- loaderfile
- script fileCompileException
- if compiling failedLoadException
- if loading failedpublic Class<?> load(URL url)
url
- script URLCompileException
- if compiling failedLoadException
- if loading failedpublic Class<?> load(Loader loader, URL url)
loader
- loaderurl
- script URLCompileException
- if compiling failedLoadException
- if loading failedpublic Class<?> load(Source source)
source
- sourceCompileException
- if compiling failedLoadException
- if loading failedpublic Class<?> load(Loader loader, Source source)
loader
- loadersource
- sourceCompileException
- if compiling failedLoadException
- if loading failedpublic groovy.lang.Script create(Class<?> clazz)
Script
from the given class.clazz
- classCreateException
- if could not create the instance or the given class is not a scriptpublic groovy.lang.Script create(String text)
text
- script textCompileException
- if compiling failedLoadException
- if loading failedCreateException
- if could not create the instance or is not a scriptpublic groovy.lang.Script create(Loader loader, String text)
loader
- loadertext
- script textCompileException
- if compiling failedLoadException
- if loading failedCreateException
- if could not create the instance or is not a scriptpublic groovy.lang.Script create(String text, String desiredClassName)
text
- script textdesiredClassName
- desired class nameCompileException
- if compiling failedLoadException
- if loading failedCreateException
- if could not create the instance or is not a scriptpublic groovy.lang.Script create(Loader loader, String text, String desiredClassName)
loader
- loadertext
- script textdesiredClassName
- desired class nameCompileException
- if compiling failedLoadException
- if loading failedCreateException
- if could not create the instance or is not a scriptpublic groovy.lang.Script create(File file)
file
- script fileCompileException
- if compiling failedLoadException
- if loading failedCreateException
- if could not create the instance or is not a scriptpublic groovy.lang.Script create(Loader loader, File file)
loader
- loaderfile
- script fileCompileException
- if compiling failedLoadException
- if loading failedCreateException
- if could not create the instance or is not a scriptpublic groovy.lang.Script create(URL url)
url
- script URLCompileException
- if compiling failedLoadException
- if loading failedCreateException
- if could not create the instance or is not a scriptpublic groovy.lang.Script create(Loader loader, URL url)
loader
- loaderurl
- script URLCompileException
- if compiling failedLoadException
- if loading failedCreateException
- if could not create the instance or is not a scriptpublic groovy.lang.Script create(Source source)
source
- sourceCompileException
- if compiling failedLoadException
- if loading failedCreateException
- if could not create the instance or is not a scriptpublic groovy.lang.Script create(Loader loader, Source source)
loader
- loadersource
- sourceCompileException
- if compiling failedLoadException
- if loading failedCreateException
- if could not create the instance or is not a scriptpublic groovy.lang.Binding binding()
Same as new Binding()
.
public groovy.lang.Binding binding(String key, Object value)
key
- keyvalue
- valuepublic groovy.lang.Binding binding(String key1, Object value1, String key2, Object value2)
key1
- key 1value1
- value 1key2
- key 2value2
- value 2public groovy.lang.Binding binding(String key1, Object value1, String key2, Object value2, String key3, Object value3)
key1
- key 1value1
- value 1key2
- key 2value2
- value 2key3
- key 3value3
- value 3public groovy.lang.Binding binding(String key1, Object value1, String key2, Object value2, String key3, Object value3, String key4, Object value4)
key1
- key 1value1
- value 1key2
- key 2value2
- value 2key3
- key 3value3
- value 3key4
- key 4value4
- value 4public groovy.lang.Binding binding(String key1, Object value1, String key2, Object value2, String key3, Object value3, String key4, Object value4, String key5, Object value5, Object... moreKeyValuePairs)
key1
- key 1value1
- value 1key2
- key 2value2
- value 2key3
- key 3value3
- value 3key4
- key 4value4
- value 4key5
- key 5value5
- value 5moreKeyValuePairs
- must be an even number of arguments (key/value) and all keys must be stringsIllegalArgumentException
- if the number of arguments is odd or if a key is not a stringpublic Object run(groovy.lang.Script script)
Note that the script may throw anything, checked or unchecked.
script
- scriptThrowable
- anything (checked or unchecked) that Script.run()
may throwpublic Object run(groovy.lang.Script script, Map<String,Object> bindingMap)
Note that the script may throw anything, checked or unchecked.
script
- scriptbindingMap
- binding mapThrowable
- anything (checked or unchecked) that Script.run()
may throwpublic Object run(groovy.lang.Script script, groovy.lang.Binding binding)
Note that the script may throw anything, checked or unchecked.
script
- scriptbinding
- bindingThrowable
- anything (checked or unchecked) that Script.run()
may throwpublic Object run(String text)
text
- script textCompileException
- if compiling failedLoadException
- if loading failedCreateException
- if could not create the instance or is not a scriptThrowable
- anything (checked or unchecked) that Script.run()
may throwpublic Object run(String text, Map<String,Object> bindingMap)
text
- script textbindingMap
- binding mapCompileException
- if compiling failedLoadException
- if loading failedCreateException
- if could not create the instance or is not a scriptThrowable
- anything (checked or unchecked) that Script.run()
may throwpublic Object run(String text, groovy.lang.Binding binding)
text
- script textbinding
- bindingCompileException
- if compiling failedLoadException
- if loading failedCreateException
- if could not create the instance or is not a scriptThrowable
- anything (checked or unchecked) that Script.run()
may throwpublic Object run(Loader loader, String text)
loader
- loadertext
- script textCompileException
- if compiling failedLoadException
- if loading failedCreateException
- if could not create the instance or is not a scriptThrowable
- anything (checked or unchecked) that Script.run()
may throwpublic Object run(Loader loader, String text, Map<String,Object> bindingMap)
loader
- loadertext
- script textbindingMap
- binding mapCompileException
- if compiling failedLoadException
- if loading failedCreateException
- if could not create the instance or is not a scriptThrowable
- anything (checked or unchecked) that Script.run()
may throwpublic Object run(Loader loader, String text, groovy.lang.Binding binding)
loader
- loadertext
- script textbinding
- bindingCompileException
- if compiling failedLoadException
- if loading failedCreateException
- if could not create the instance or is not a scriptThrowable
- anything (checked or unchecked) that Script.run()
may throwpublic Object run(String text, String desiredClassName)
text
- script textdesiredClassName
- desired class nameCompileException
- if compiling failedLoadException
- if loading failedCreateException
- if could not create the instance or is not a scriptThrowable
- anything (checked or unchecked) that Script.run()
may throwpublic Object run(String text, String desiredClassName, Map<String,Object> bindingMap)
text
- script textdesiredClassName
- desired class namebindingMap
- binding mapCompileException
- if compiling failedLoadException
- if loading failedCreateException
- if could not create the instance or is not a scriptThrowable
- anything (checked or unchecked) that Script.run()
may throwpublic Object run(String text, String desiredClassName, groovy.lang.Binding binding)
text
- script textdesiredClassName
- desired class namebinding
- bindingCompileException
- if compiling failedLoadException
- if loading failedCreateException
- if could not create the instance or is not a scriptThrowable
- anything (checked or unchecked) that Script.run()
may throwpublic Object run(Loader loader, String text, String desiredClassName)
loader
- loadertext
- script textdesiredClassName
- desired class nameCompileException
- if compiling failedLoadException
- if loading failedCreateException
- if could not create the instance or is not a scriptThrowable
- anything (checked or unchecked) that Script.run()
may throwpublic Object run(Loader loader, String text, String desiredClassName, Map<String,Object> bindingMap)
loader
- loadertext
- script textdesiredClassName
- desired class namebindingMap
- binding mapCompileException
- if compiling failedLoadException
- if loading failedCreateException
- if could not create the instance or is not a scriptThrowable
- anything (checked or unchecked) that Script.run()
may throwpublic Object run(Loader loader, String text, String desiredClassName, groovy.lang.Binding binding)
loader
- loadertext
- script textdesiredClassName
- desired class namebinding
- bindingCompileException
- if compiling failedLoadException
- if loading failedCreateException
- if could not create the instance or is not a scriptThrowable
- anything (checked or unchecked) that Script.run()
may throwpublic Object run(File file)
file
- script fileCompileException
- if compiling failedLoadException
- if loading failedCreateException
- if could not create the instance or is not a scriptThrowable
- anything (checked or unchecked) that Script.run()
may throwpublic Object run(File file, Map<String,Object> bindingMap)
file
- script filebindingMap
- binding mapCompileException
- if compiling failedLoadException
- if loading failedCreateException
- if could not create the instance or is not a scriptThrowable
- anything (checked or unchecked) that Script.run()
may throwpublic Object run(File file, groovy.lang.Binding binding)
file
- script filebinding
- bindingCompileException
- if compiling failedLoadException
- if loading failedCreateException
- if could not create the instance or is not a scriptThrowable
- anything (checked or unchecked) that Script.run()
may throwpublic Object run(Loader loader, File file)
loader
- loaderfile
- script fileCompileException
- if compiling failedLoadException
- if loading failedCreateException
- if could not create the instance or is not a scriptThrowable
- anything (checked or unchecked) that Script.run()
may throwpublic Object run(Loader loader, File file, Map<String,Object> bindingMap)
loader
- loaderfile
- script filebindingMap
- binding mapCompileException
- if compiling failedLoadException
- if loading failedCreateException
- if could not create the instance or is not a scriptThrowable
- anything (checked or unchecked) that Script.run()
may throwpublic Object run(Loader loader, File file, groovy.lang.Binding binding)
loader
- loaderfile
- script filebinding
- bindingCompileException
- if compiling failedLoadException
- if loading failedCreateException
- if could not create the instance or is not a scriptThrowable
- anything (checked or unchecked) that Script.run()
may throwpublic Object run(URL url)
url
- script URLCompileException
- if compiling failedLoadException
- if loading failedCreateException
- if could not create the instance or is not a scriptThrowable
- anything (checked or unchecked) that Script.run()
may throwpublic Object run(URL url, Map<String,Object> bindingMap)
url
- script URLbindingMap
- binding mapCompileException
- if compiling failedLoadException
- if loading failedCreateException
- if could not create the instance or is not a scriptThrowable
- anything (checked or unchecked) that Script.run()
may throwpublic Object run(URL url, groovy.lang.Binding binding)
url
- script URLbinding
- bindingCompileException
- if compiling failedLoadException
- if loading failedCreateException
- if could not create the instance or is not a scriptThrowable
- anything (checked or unchecked) that Script.run()
may throwpublic Object run(Loader loader, URL url)
loader
- loaderurl
- script URLCompileException
- if compiling failedLoadException
- if loading failedCreateException
- if could not create the instance or is not a scriptThrowable
- anything (checked or unchecked) that Script.run()
may throwpublic Object run(Loader loader, URL url, Map<String,Object> bindingMap)
loader
- loaderurl
- script URLbindingMap
- binding mapCompileException
- if compiling failedLoadException
- if loading failedCreateException
- if could not create the instance or is not a scriptThrowable
- anything (checked or unchecked) that Script.run()
may throwpublic Object run(Loader loader, URL url, groovy.lang.Binding binding)
loader
- loaderurl
- script URLbinding
- bindingCompileException
- if compiling failedLoadException
- if loading failedCreateException
- if could not create the instance or is not a scriptThrowable
- anything (checked or unchecked) that Script.run()
may throwpublic Object run(Source source)
source
- sourceCompileException
- if compiling failedLoadException
- if loading failedCreateException
- if could not create the instance or is not a scriptThrowable
- anything (checked or unchecked) that Script.run()
may throwpublic Object run(Source source, Map<String,Object> bindingMap)
source
- sourcebindingMap
- binding mapCompileException
- if compiling failedLoadException
- if loading failedCreateException
- if could not create the instance or is not a scriptThrowable
- anything (checked or unchecked) that Script.run()
may throwpublic Object run(Source source, groovy.lang.Binding binding)
source
- sourcebinding
- bindingCompileException
- if compiling failedLoadException
- if loading failedCreateException
- if could not create the instance or is not a scriptThrowable
- anything (checked or unchecked) that Script.run()
may throwpublic Object run(Loader loader, Source source)
loader
- loadersource
- sourceCompileException
- if compiling failedLoadException
- if loading failedCreateException
- if could not create the instance or is not a scriptThrowable
- anything (checked or unchecked) that Script.run()
may throwpublic Object run(Loader loader, Source source, Map<String,Object> bindingMap)
loader
- loadersource
- sourcebindingMap
- binding mapCompileException
- if compiling failedLoadException
- if loading failedCreateException
- if could not create the instance or is not a scriptThrowable
- anything (checked or unchecked) that Script.run()
may throwpublic Object run(Loader loader, Source source, groovy.lang.Binding binding)
loader
- loadersource
- sourcebinding
- bindingCompileException
- if compiling failedLoadException
- if loading failedCreateException
- if could not create the instance or is not a scriptThrowable
- anything (checked or unchecked) that Script.run()
may throw