[Add] BotCode 增加 getCodePattern 方法以允许其他类获取BotCode所使用的正则匹配表达式;

This commit is contained in:
LamGC 2020-04-19 12:20:58 +08:00
parent 970be847a0
commit 11005b0f6c

View File

@ -54,6 +54,14 @@ public class BotCode {
return new BotCode(keys[0], keys[1], param); return new BotCode(keys[0], keys[1], param);
} }
/**
* 获取BotCode所使用的匹配正则表达式
* @return 用于匹配BotCode的正则表达式对象
*/
public static Pattern getCodePattern() {
return Pattern.compile(codePattern.pattern());
}
private String platformName; private String platformName;
private String functionName; private String functionName;
private Hashtable<String, String> parameter = new Hashtable<>(); private Hashtable<String, String> parameter = new Hashtable<>();