Package org.codehaus.groovy.jsr223
Class GroovyScriptEngineImpl
- java.lang.Object
- 
- javax.script.AbstractScriptEngine
- 
- org.codehaus.groovy.jsr223.GroovyScriptEngineImpl
 
 
- 
- All Implemented Interfaces:
- Compilable,- Invocable,- ScriptEngine
 
 public class GroovyScriptEngineImpl extends AbstractScriptEngine implements Compilable, Invocable JSR-223 Engine implementation. Adapted from original by Mike Grogan and A. Sundararajan
- 
- 
Field Summary- 
Fields inherited from class javax.script.AbstractScriptEnginecontext
 - 
Fields inherited from interface javax.script.ScriptEngineARGV, ENGINE, ENGINE_VERSION, FILENAME, LANGUAGE, LANGUAGE_VERSION, NAME
 
- 
 - 
Constructor SummaryConstructors Constructor Description GroovyScriptEngineImpl()GroovyScriptEngineImpl(GroovyClassLoader classLoader)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description CompiledScriptcompile(Reader reader)CompiledScriptcompile(String scriptSource)BindingscreateBindings()Objecteval(Reader reader, ScriptContext ctx)Objecteval(String script, ScriptContext ctx)GroovyClassLoadergetClassLoader()ScriptEngineFactorygetFactory()<T> TgetInterface(Class<T> clazz)<T> TgetInterface(Object thiz, Class<T> clazz)ObjectinvokeFunction(String name, Object... args)ObjectinvokeMethod(Object thiz, String name, Object... args)voidsetClassLoader(GroovyClassLoader classLoader)- 
Methods inherited from class javax.script.AbstractScriptEngineeval, eval, eval, eval, get, getBindings, getContext, getScriptContext, put, setBindings, setContext
 
- 
 
- 
- 
- 
Constructor Detail- 
GroovyScriptEngineImplpublic GroovyScriptEngineImpl() 
 - 
GroovyScriptEngineImplpublic GroovyScriptEngineImpl(GroovyClassLoader classLoader) 
 
- 
 - 
Method Detail- 
evalpublic Object eval(Reader reader, ScriptContext ctx) throws ScriptException - Specified by:
- evalin interface- ScriptEngine
- Throws:
- ScriptException
 
 - 
evalpublic Object eval(String script, ScriptContext ctx) throws ScriptException - Specified by:
- evalin interface- ScriptEngine
- Throws:
- ScriptException
 
 - 
createBindingspublic Bindings createBindings() - Specified by:
- createBindingsin interface- ScriptEngine
 
 - 
getFactorypublic ScriptEngineFactory getFactory() - Specified by:
- getFactoryin interface- ScriptEngine
 
 - 
compilepublic CompiledScript compile(String scriptSource) throws ScriptException - Specified by:
- compilein interface- Compilable
- Throws:
- ScriptException
 
 - 
compilepublic CompiledScript compile(Reader reader) throws ScriptException - Specified by:
- compilein interface- Compilable
- Throws:
- ScriptException
 
 - 
invokeFunctionpublic Object invokeFunction(String name, Object... args) throws ScriptException, NoSuchMethodException - Specified by:
- invokeFunctionin interface- Invocable
- Throws:
- ScriptException
- NoSuchMethodException
 
 - 
invokeMethodpublic Object invokeMethod(Object thiz, String name, Object... args) throws ScriptException, NoSuchMethodException - Specified by:
- invokeMethodin interface- Invocable
- Throws:
- ScriptException
- NoSuchMethodException
 
 - 
getInterfacepublic <T> T getInterface(Class<T> clazz) - Specified by:
- getInterfacein interface- Invocable
 
 - 
getInterfacepublic <T> T getInterface(Object thiz, Class<T> clazz) - Specified by:
- getInterfacein interface- Invocable
 
 - 
setClassLoaderpublic void setClassLoader(GroovyClassLoader classLoader) 
 - 
getClassLoaderpublic GroovyClassLoader getClassLoader() 
 
- 
 
-