Package com.skillw.asahi.api
Object AsahiAPI
-
- All Implemented Interfaces:
public class AsahiAPI
-
-
Method Summary
Modifier and Type Method Description final static String
analysis(String $self, AsahiContext context, String namespaces)
解析文本中的Asahi 例如: "测试Asahi: {random 0 to 1}" 返回: "测试Asahi: 0.88"
final static Object
asahi(String $self, AsahiContext context, String namespaces)
执行一段Asahi脚本 final static AsahiCompiledScript
compile(String $self, String namespaces, AsahiEngine engine)
编译脚本 final static AsahiCompiledScript
compile(Collection<String> $self, String namespaces, AsahiEngine engine)
-
-
Method Detail
-
analysis
final static String analysis(String $self, AsahiContext context, String namespaces)
解析文本中的Asahi 例如:
"测试Asahi: {random 0 to 1}" 返回: "测试Asahi: 0.88"
- Parameters:
context
- 上下文- Returns:
String 解析后的文本
-
asahi
final static Object asahi(String $self, AsahiContext context, String namespaces)
执行一段Asahi脚本
- Parameters:
context
- 上下文namespaces
- 命名空间(含哪些空间的函数)- Returns:
Any 结果
-
compile
final static AsahiCompiledScript compile(String $self, String namespaces, AsahiEngine engine)
编译脚本
- Parameters:
namespaces
- Array<out String> 命名空间engine
- AsahiEngine 引擎- Returns:
AsahiCompiledScript 预编译脚本
-
compile
final static AsahiCompiledScript compile(Collection<String> $self, String namespaces, AsahiEngine engine)
-
-
-