更新时间:2023-09-24 15:52:22
Abstract Singleton?对我来说听起来不可行.单例模式需要一个 private
构造函数,这已经使得子类化变得不可能.你需要重新考虑你的设计.抽象工厂模式可能更适合特定目的.
Abstract Singleton? Doesn't sound viable to me. The Singleton pattern requires a private
constructor and this already makes subclassing impossible. You'll need to rethink your design. The Abstract Factory pattern may be more suitable for the particular purpose.