As we know what dependency injection is, let us explore how Google Guice provides injection.
We have seen that the injector helps to resolve dependencies by reading configurations from modules, which are called bindings. Injector is preparing charts for the requested objects.
Dependency injection is managed by injectors using various types of injection:
- Constructor injection
- Method injection
- Field injection
- Optional injection
- Static injection