'What is the name of this reference class design pattern?
Is there a name for the design pattern where a single class is written to contain references to commonly used objects, which are usually singletons? And is it wise to use such a class or is there a better way to do this?
Here's an example:
public class References {
AccountManager accountManager = new AccountManager();
UserManager userManager = new UserManager();
TransactionHandler handler = new TransactionHandler();
Calculator calc = new Calculator();
/// etc.
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
