名称修改

This commit is contained in:
Jerry Yan 2025-02-05 13:50:26 +08:00
parent 7892c0f5cc
commit 42822f7eda

View File

@ -33,7 +33,7 @@ public class NotifyFactory {
namedNotifier.put(name, adapter);
}
public static INotifyAdapter to(String name) {
public static INotifyAdapter via(String name) {
INotifyAdapter adapter = namedNotifier.get(name);
if (adapter == null) {
throw new RuntimeException("未定义的通知方式:"+name);
@ -41,7 +41,7 @@ public class NotifyFactory {
return adapter;
}
public static INotifyAdapter to() {
public static INotifyAdapter via() {
if (defaultNotifier == null) {
throw new RuntimeException("未定义默认通知方式");
}
@ -49,6 +49,6 @@ public class NotifyFactory {
}
public static void setDefault(String defaultStorage) {
NotifyFactory.defaultNotifier = to(defaultStorage);
NotifyFactory.defaultNotifier = via(defaultStorage);
}
}