Static
getGets the singleton instance of the class. If the class is not registered, it throws an error.
The type of the class.
The name of the class to get the singleton instance.
The singleton instance of the class.
Static
hasChecks if the class is registered in the SingletonManager.
The name of the class to check if it is registered.
True if the class is registered, otherwise false.
Static
registerRegisters a class constructor in the SingletonManager.
The type of the class.
The tuple type of the constructor arguments.
Static
unregister
SingletonManager is a static class that manages the singletons in the application. When a class is registered, the SingletonManager creates a new instance of the class when it is requested.
Example