Package com.skillw.asahi.internal.script
Class AsahiEngineImpl
-
- All Implemented Interfaces:
-
javax.script.Compilable
,javax.script.Invocable
,javax.script.ScriptEngine
public final class AsahiEngineImpl extends AsahiEngine
Glom
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public class
AsahiEngineImpl.Companion
-
Field Summary
Fields Modifier and Type Field Description public final static AsahiEngineImpl.Companion
Companion
-
Method Summary
Modifier and Type Method Description Object
eval(String script, ScriptContext context)
Object
eval(String script, Bindings bindings)
Object
eval(Reader reader, Bindings bindings)
Object
eval(Reader reader, ScriptContext context)
Object
eval(String script)
Object
eval(Reader reader)
AsahiContext
createBindings()
ScriptEngineFactory
getFactory()
AsahiCompiledScript
compile(String script, String namespaces)
编译 AsahiCompiledScript
compile(Collection<String> tokens, String namespaces)
编译 AsahiCompiledScript
compile(File file, String namespaces)
编译 AsahiCompiledScript
compile(String script)
AsahiCompiledScript
compile(Reader script)
AsahiContext
context()
上下文 AsahiContext
global()
全局上下文 Object
invokeMethod(Object thiz, String name, Object args)
Object
invokeFunction(String name, Object args)
<T extends Any> T
getInterface(Class<T> clasz)
<T extends Any> T
getInterface(Object thiz, Class<T> clasz)
-
-
Method Detail
-
eval
Object eval(String script, ScriptContext context)
-
eval
Object eval(Reader reader, ScriptContext context)
-
createBindings
AsahiContext createBindings()
-
getFactory
ScriptEngineFactory getFactory()
-
compile
AsahiCompiledScript compile(String script, String namespaces)
编译
- Parameters:
script
- 脚本字符串namespaces
- 命名空间- Returns:
预编译脚本
-
compile
AsahiCompiledScript compile(Collection<String> tokens, String namespaces)
编译
- Parameters:
tokens
- Tokens列表namespaces
- 命名空间- Returns:
预编译脚本
-
compile
AsahiCompiledScript compile(File file, String namespaces)
编译
- Parameters:
file
- 文件namespaces
- 命名空间- Returns:
预编译脚本
-
compile
AsahiCompiledScript compile(String script)
-
compile
AsahiCompiledScript compile(Reader script)
-
context
AsahiContext context()
上下文
-
global
AsahiContext global()
全局上下文
-
invokeMethod
Object invokeMethod(Object thiz, String name, Object args)
-
invokeFunction
Object invokeFunction(String name, Object args)
-
getInterface
<T extends Any> T getInterface(Class<T> clasz)
-
-
-
-