addTransient<T extends Object> static method
void
addTransient<T extends Object>(
- T factory()
Registers a dependency as a Transient (Factory).
A new instance will be created every time get is called.
Throws an IonLocatorDuplicateRegistrationException if the type is already registered.
Implementation
static void addTransient<T extends Object>(T Function() factory) {
_factories.containsKey(T)
? throw IonLocatorDuplicateRegistrationException(T)
: _factories[T] = factory;
}