Class GroovyScripting
java.lang.Object
org.nuxeo.ecm.webengine.scripting.GroovyScripting
For Groovy we are not using the javax.script API because we need more control over debug mode and script class
loader. Groovy scritps will be processed by this class
- Author:
- Bogdan Stefanescu
-
Field Summary
-
Constructor Summary
ConstructorDescriptionGroovyScripting
(ClassLoader parent) GroovyScripting
(ClassLoader parent, org.codehaus.groovy.control.CompilerConfiguration cfg) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addClasspath
(String cp) void
addClasspathUrl
(URL cp) void
Class<?>
groovy.lang.GroovyClassLoader
groovy.lang.Script
Class<?>
-
Field Details
-
loader
protected final groovy.lang.GroovyClassLoader loader -
cache
-
-
Constructor Details
-
GroovyScripting
-
GroovyScripting
-
-
Method Details
-
addClasspath
-
addClasspathUrl
-
clearCache
public void clearCache() -
loadClass
- Throws:
ClassNotFoundException
-
getGroovyClassLoader
public groovy.lang.GroovyClassLoader getGroovyClassLoader() -
eval
- Throws:
groovy.lang.GroovyRuntimeException
-
eval
public Object eval(File file, groovy.lang.Binding context) throws groovy.lang.GroovyRuntimeException - Throws:
groovy.lang.GroovyRuntimeException
-
compile
- Throws:
groovy.lang.GroovyRuntimeException
-
getScript
public groovy.lang.Script getScript(File file, groovy.lang.Binding context) throws groovy.lang.GroovyRuntimeException - Throws:
groovy.lang.GroovyRuntimeException
-