提问人:Z. Reticulan 提问时间:2/17/2022 更新时间:2/17/2022 访问量:35
此引用类设计模式的名称是什么?
What is the name of this reference class design pattern?
问:
是否有设计模式的名称,其中编写单个类以包含对常用对象(通常是单例)的引用?使用这样的类是否明智,或者有更好的方法来做到这一点?
下面是一个示例:
public class References {
AccountManager accountManager = new AccountManager();
UserManager userManager = new UserManager();
TransactionHandler handler = new TransactionHandler();
Calculator calc = new Calculator();
/// etc.
}
答: 暂无答案
下一个:调解器模式优势
评论
References