Listing a class as an entry point should not make instantiable via @Inject
Author: ghostCreated Jun 20, 2013Updated Dec 27, 2015
Labelsenhancement
When you list a class as an entry point in a module's inject parameter, dagger will allow you to @Inject it into other classes. But if you could do that safely, you likely would have annotated its constructor, or built a provider method for it.
As it stands our Android apps have generated getApplication() methods which only do bad things if we ever make the mistake of calling them — like waste a day of my life tracking down an obscure bug caused by some test code that naively was doing just that.
We shouldn't generate those methods, and attempting to @Inject such a class should fail as fast as possible.
Source: square/dagger