Google Guice is a universal open source framework for the Java platform, developed by Google under the Apache 2.0 license . The framework provides support for dependency injection using annotations to configure Java objects [1] .
| Google guice | |
|---|---|
| Type of | Dependency Injection |
| Developer | |
| Written on | Java |
| operating system | Cross-platform software |
| Latest version | 4.2.0 ( February 28, 2018 ) |
| condition | Active |
| License | Apache 2.0 license |
| Website | github.com/google/guice |
Dependency injection is a design pattern whose main task is to separate the behavior of an object from the control of its dependencies. Guice allows implementation classes to be programmatically bound to an interface and then injected into constructors , methods, or fields marked with the @Inject annotation . When it is necessary to provide more than one implementation of one interface, the user can create their own annotation that determines the choice of the desired implementation, and then use it to implement dependencies.