public static class Grengine.Grape extends Object
Call activate() once before using the newGrengine()
methods to create a Grengine instance that works with Grape.
See the user manual at "Grengine and Grape" and the DefaultGroovyCompiler
class for more information.
| Constructor and Description |
|---|
Grape() |
| Modifier and Type | Method and Description |
|---|---|
static void |
activate()
activate Grape.
|
static void |
activate(Object lock)
activate Grape.
|
static void |
deactivate()
deactivate Grape.
|
static Grengine |
newGrengine()
equivalent to
Grengine(),
with the following differences. |
static Grengine |
newGrengine(Collection<URL> urls)
equivalent to
Grengine(Collection),
with the following differences. |
static Grengine |
newGrengine(org.codehaus.groovy.control.CompilerConfiguration config)
equivalent to
Grengine(CompilerConfiguration),
with the following differences. |
static Grengine |
newGrengine(org.codehaus.groovy.control.CompilerConfiguration config,
Collection<URL> urls)
equivalent to
Grengine(CompilerConfiguration, Collection),
with the following differences. |
static Grengine |
newGrengine(org.codehaus.groovy.control.CompilerConfiguration config,
File dir)
equivalent to
Grengine(CompilerConfiguration, File),
with the following differences. |
static Grengine |
newGrengine(org.codehaus.groovy.control.CompilerConfiguration config,
File dir,
DirMode dirMode)
equivalent to
Grengine(CompilerConfiguration, File, DirMode),
with the following differences. |
static Grengine |
newGrengine(File dir)
equivalent to
Grengine(File),
with the following differences. |
static Grengine |
newGrengine(File dir,
DirMode dirMode)
equivalent to
Grengine(File, DirMode),
with the following differences. |
static Grengine |
newGrengine(groovy.lang.GroovyClassLoader parent)
equivalent to
Grengine(ClassLoader),
with the following differences. |
static Grengine |
newGrengine(groovy.lang.GroovyClassLoader parent,
Collection<URL> urls)
equivalent to
Grengine(ClassLoader, Collection),
with the following differences. |
static Grengine |
newGrengine(groovy.lang.GroovyClassLoader parent,
org.codehaus.groovy.control.CompilerConfiguration config)
equivalent to
Grengine(ClassLoader, CompilerConfiguration). |
static Grengine |
newGrengine(groovy.lang.GroovyClassLoader parent,
org.codehaus.groovy.control.CompilerConfiguration config,
Collection<URL> urls)
equivalent to
Grengine(ClassLoader, CompilerConfiguration, Collection). |
static Grengine |
newGrengine(groovy.lang.GroovyClassLoader parent,
org.codehaus.groovy.control.CompilerConfiguration config,
File dir)
equivalent to
Grengine(ClassLoader, CompilerConfiguration, File). |
static Grengine |
newGrengine(groovy.lang.GroovyClassLoader parent,
org.codehaus.groovy.control.CompilerConfiguration config,
File dir,
DirMode dirMode)
equivalent to
Grengine(ClassLoader, CompilerConfiguration, File, DirMode). |
static Grengine |
newGrengine(groovy.lang.GroovyClassLoader parent,
File dir)
equivalent to
Grengine(ClassLoader, File),
with the following differences. |
static Grengine |
newGrengine(groovy.lang.GroovyClassLoader parent,
File dir,
DirMode dirMode)
equivalent to
Grengine(ClassLoader, File, DirMode),
with the following differences. |
public static void activate()
See DefaultGroovyCompiler.enableGrapeSupport() and
the user manual for more information.
public static void activate(Object lock)
See DefaultGroovyCompiler.enableGrapeSupport(Object) and
the user manual for more information.
lock - lock to usepublic static void deactivate()
See DefaultGroovyCompiler.disableGrapeSupport() and the user
manual for more information.
public static Grengine newGrengine()
Grengine(),
with the following differences.
Parent class loader is a GroovyClassLoader with the context class loader of the current thread as its parent. Compiler configuration is the default compiler configuration, with added Grape support.
public static Grengine newGrengine(org.codehaus.groovy.control.CompilerConfiguration config)
Grengine(CompilerConfiguration),
with the following differences.
Parent class loader is a GroovyClassLoader with the context class loader of the current thread as its parent.
config - compiler configuration to use for compiling all sources,
Grape support is added to itNullPointerException - if the compiler configuration is nullpublic static Grengine newGrengine(groovy.lang.GroovyClassLoader parent)
Grengine(ClassLoader),
with the following differences.
Compiler configuration is the default compiler configuration, with added Grape support.
parent - parent class loader for the engineNullPointerException - if the parent class loader is nullpublic static Grengine newGrengine(groovy.lang.GroovyClassLoader parent, org.codehaus.groovy.control.CompilerConfiguration config)
Grengine(ClassLoader, CompilerConfiguration).parent - parent class loader for the engineconfig - compiler configuration to use for compiling all sources,
Grape support is added to itNullPointerException - if any argument is nullpublic static Grengine newGrengine(File dir)
Grengine(File),
with the following differences.
Parent class loader is a GroovyClassLoader with the context class loader of the current thread as its parent. Compiler configuration is the default compiler configuration, with added Grape support.
dir - script directoryNullPointerException - if the directory is nullpublic static Grengine newGrengine(org.codehaus.groovy.control.CompilerConfiguration config, File dir)
Grengine(CompilerConfiguration, File),
with the following differences.
Parent class loader is a GroovyClassLoader with the context class loader of the current thread as its parent.
config - compiler configuration to use for compiling all sources,
Grape support is added to itdir - script directoryNullPointerException - if any argument is nullpublic static Grengine newGrengine(groovy.lang.GroovyClassLoader parent, File dir)
Grengine(ClassLoader, File),
with the following differences.
Compiler configuration is the default compiler configuration, with added Grape support.
parent - parent class loader for the enginedir - script directoryNullPointerException - if any argument is nullpublic static Grengine newGrengine(groovy.lang.GroovyClassLoader parent, org.codehaus.groovy.control.CompilerConfiguration config, File dir)
Grengine(ClassLoader, CompilerConfiguration, File).parent - parent class loader for the engineconfig - compiler configuration to use for compiling all sources,
Grape support is added to itdir - script directoryNullPointerException - if any argument is nullpublic static Grengine newGrengine(File dir, DirMode dirMode)
Grengine(File, DirMode),
with the following differences.
Parent class loader is a GroovyClassLoader with the context class loader of the current thread as its parent. Compiler configuration is the default compiler configuration, with added Grape support.
dir - script directorydirMode - dir modeNullPointerException - if any argument is nullpublic static Grengine newGrengine(org.codehaus.groovy.control.CompilerConfiguration config, File dir, DirMode dirMode)
Grengine(CompilerConfiguration, File, DirMode),
with the following differences.
Parent class loader is a GroovyClassLoader with the context class loader of the current thread as its parent.
config - compiler configuration to use for compiling all sources,
Grape support is added to itdir - script directorydirMode - dir modeNullPointerException - if any argument is nullpublic static Grengine newGrengine(groovy.lang.GroovyClassLoader parent, File dir, DirMode dirMode)
Grengine(ClassLoader, File, DirMode),
with the following differences.
Compiler configuration is the default compiler configuration, with added Grape support.
parent - parent class loader for the enginedir - script directorydirMode - dir modeNullPointerException - if any argument is nullpublic static Grengine newGrengine(groovy.lang.GroovyClassLoader parent, org.codehaus.groovy.control.CompilerConfiguration config, File dir, DirMode dirMode)
Grengine(ClassLoader, CompilerConfiguration, File, DirMode).parent - parent class loader for the engineconfig - compiler configuration to use for compiling all sources,
Grape support is added to itdir - script directorydirMode - dir modeNullPointerException - if any argument is nullpublic static Grengine newGrengine(Collection<URL> urls)
Grengine(Collection),
with the following differences.
Parent class loader is a GroovyClassLoader with the context class loader of the current thread as its parent. Compiler configuration is the default compiler configuration, with added Grape support.
urls - collection of URL-based scriptsNullPointerException - if the URL collection is nullpublic static Grengine newGrengine(org.codehaus.groovy.control.CompilerConfiguration config, Collection<URL> urls)
Grengine(CompilerConfiguration, Collection),
with the following differences.
Parent class loader is a GroovyClassLoader with the context class loader of the current thread as its parent.
config - compiler configuration to use for compiling all sources,
Grape support is added to iturls - collection of URL-based scriptsNullPointerException - if any argument is nullpublic static Grengine newGrengine(groovy.lang.GroovyClassLoader parent, Collection<URL> urls)
Grengine(ClassLoader, Collection),
with the following differences.
Compiler configuration is the default compiler configuration, with added Grape support.
parent - parent class loader for the engineurls - collection of URL-based scriptsNullPointerException - if any argument is nullpublic static Grengine newGrengine(groovy.lang.GroovyClassLoader parent, org.codehaus.groovy.control.CompilerConfiguration config, Collection<URL> urls)
Grengine(ClassLoader, CompilerConfiguration, Collection).parent - parent class loader for the engineconfig - compiler configuration to use for compiling all sources,
Grape support is added to iturls - collection of URL-based scriptsNullPointerException - if any argument is null