public class GroovyScriptEngineImpl
extends javax.script.AbstractScriptEngine
implements javax.script.Compilable, javax.script.Invocable
Constructor and Description |
---|
GroovyScriptEngineImpl() |
GroovyScriptEngineImpl(GroovyClassLoader classLoader) |
Modifier and Type | Method and Description |
---|---|
javax.script.CompiledScript |
compile(java.io.Reader reader) |
javax.script.CompiledScript |
compile(java.lang.String scriptSource) |
javax.script.Bindings |
createBindings() |
java.lang.Object |
eval(java.io.Reader reader,
javax.script.ScriptContext ctx) |
java.lang.Object |
eval(java.lang.String script,
javax.script.ScriptContext ctx) |
GroovyClassLoader |
getClassLoader() |
javax.script.ScriptEngineFactory |
getFactory() |
<T> T |
getInterface(java.lang.Class<T> clazz) |
<T> T |
getInterface(java.lang.Object thiz,
java.lang.Class<T> clazz) |
java.lang.Object |
invokeFunction(java.lang.String name,
java.lang.Object... args) |
java.lang.Object |
invokeMethod(java.lang.Object thiz,
java.lang.String name,
java.lang.Object... args) |
void |
setClassLoader(GroovyClassLoader classLoader) |
public GroovyScriptEngineImpl()
public GroovyScriptEngineImpl(GroovyClassLoader classLoader)
public java.lang.Object eval(java.io.Reader reader, javax.script.ScriptContext ctx) throws javax.script.ScriptException
eval
in interface javax.script.ScriptEngine
javax.script.ScriptException
public java.lang.Object eval(java.lang.String script, javax.script.ScriptContext ctx) throws javax.script.ScriptException
eval
in interface javax.script.ScriptEngine
javax.script.ScriptException
public javax.script.Bindings createBindings()
createBindings
in interface javax.script.ScriptEngine
public javax.script.ScriptEngineFactory getFactory()
getFactory
in interface javax.script.ScriptEngine
public javax.script.CompiledScript compile(java.lang.String scriptSource) throws javax.script.ScriptException
compile
in interface javax.script.Compilable
javax.script.ScriptException
public javax.script.CompiledScript compile(java.io.Reader reader) throws javax.script.ScriptException
compile
in interface javax.script.Compilable
javax.script.ScriptException
public java.lang.Object invokeFunction(java.lang.String name, java.lang.Object... args) throws javax.script.ScriptException, java.lang.NoSuchMethodException
invokeFunction
in interface javax.script.Invocable
javax.script.ScriptException
java.lang.NoSuchMethodException
public java.lang.Object invokeMethod(java.lang.Object thiz, java.lang.String name, java.lang.Object... args) throws javax.script.ScriptException, java.lang.NoSuchMethodException
invokeMethod
in interface javax.script.Invocable
javax.script.ScriptException
java.lang.NoSuchMethodException
public <T> T getInterface(java.lang.Class<T> clazz)
getInterface
in interface javax.script.Invocable
public <T> T getInterface(java.lang.Object thiz, java.lang.Class<T> clazz)
getInterface
in interface javax.script.Invocable
public void setClassLoader(GroovyClassLoader classLoader)
public GroovyClassLoader getClassLoader()