Package com.skillw.asahi.api.script
Class AsahiEngine
-
- All Implemented Interfaces:
-
javax.script.Compilable
,javax.script.Invocable
,javax.script.ScriptEngine
public abstract class AsahiEngine extends AbstractScriptEngine implements Compilable, Invocable
Asahi 脚本引擎
-
-
Constructor Summary
Constructors Constructor Description AsahiEngine(AsahiContext context)
-
Method Summary
Modifier and Type Method Description abstract AsahiCompiledScript
compile(File file, String namespaces)
编译 abstract AsahiCompiledScript
compile(String script)
abstract AsahiCompiledScript
compile(String script, String namespaces)
编译 abstract AsahiCompiledScript
compile(Collection<String> tokens, String namespaces)
编译 abstract AsahiContext
context()
上下文 abstract AsahiContext
global()
全局上下文 final static AsahiEngine
create(AsahiEngineFactory factory, AsahiContext context)
-
-
Constructor Detail
-
AsahiEngine
AsahiEngine(AsahiContext context)
- Parameters:
context
- 上下文
-
-
Method Detail
-
compile
abstract AsahiCompiledScript compile(File file, String namespaces)
编译
- Parameters:
file
- 文件namespaces
- 命名空间- Returns:
预编译脚本
-
compile
abstract AsahiCompiledScript compile(String script)
-
compile
abstract AsahiCompiledScript compile(String script, String namespaces)
编译
- Parameters:
script
- 脚本字符串namespaces
- 命名空间- Returns:
预编译脚本
-
compile
abstract AsahiCompiledScript compile(Collection<String> tokens, String namespaces)
编译
- Parameters:
tokens
- Tokens列表namespaces
- 命名空间- Returns:
预编译脚本
-
context
abstract AsahiContext context()
上下文
-
global
abstract AsahiContext global()
全局上下文
-
create
final static AsahiEngine create(AsahiEngineFactory factory, AsahiContext context)
-
-
-
-