SingletonKey
A ServiceKey for a pre-instantiated, eagerly-loaded service.
This key is intended for services that you want to create and register at the same time, typically during the initial setup of your ServiceLocator. When you register a SingletonKey using put(), you provide the actual service instance directly. That instance is then stored and returned for all subsequent requests.
While it is possible to use this key with a late-registration function like getOrProvide(), doing so negates the eager-loading aspect of this key. For lazy-loading behavior, LazyKey is the more appropriate choice.
Inheritors
Properties
Functions
Creates an Entry to provide values.
Retrieve the value from entry. The entry will have been created by a ServiceKey that is equals to this key. If this ServiceKey is only equals to other keys of the same class, then entry will be guaranteed to be of type Entry.