Modules

Overview

Modules in the Infuse framework serve as containers for bindings, defining how instances of different classes are created and injected. A module is essentially a collection of rules that tells the injector how to provide instances of various types.

Key Features

  • Define Bindings: Specify how instances of a class should be provided, whether as a singleton, eager singleton, or a new instance each time.

  • Package-level Binding: Facilitate binding of all classes within a package, especially useful for large projects.

  • Flexibility: Modules allow for the segregation of binding configurations, making the management of dependencies more organized and maintainable.

Last updated