Class decorator that sets the class scope to Container and enables
eager instantiation when the class is registered in the container.
This causes the container to immediately create and cache the instance of the class,
instead of deferring instantiation until the first resolution.
Returns ClassDecorator
Example
@EagerInstantiate() classWizard {}
// Wizard is registered with Container scope, and an instance // is immediately created and cached by the container constwizard = container.register(Wizard);
Class decorator that sets the class scope to Container and enables eager instantiation when the class is registered in the container.
This causes the container to immediately create and cache the instance of the class, instead of deferring instantiation until the first resolution.