Dagger is a dependency injection library for Java and Android.
Dagger, by Square, is a fast dependency injection library for Java and Android. It is compatible with JSR 330. Dagger intentionally leaves out some features and imposes some restrictions in order to attain rapid startup times by eliminating slow runtime reflection, especially on Android.
Dagger 2 is a fork maintained by Google which eliminates reflection in the graph generation phase.
For instance, Dagger does not support the following:
- Method Injections.
private
andfinal
field injections.