Dagger 2 is a dependency injection framework. It is based on the Java Specification Request (JSR) 330. It uses code generation and is based on annotations. Dagger 2 uses generated code to access the fields and not reflection. Therefore it is not allowed to use private fields for field injection.
Click here to learn more.