Class DispatchingAndroidInjector<T>

  • Type Parameters:
    T - the core Android type to be injected
    All Implemented Interfaces:
    AndroidInjector<T>

    @Beta
    public final class DispatchingAndroidInjector<T>
    extends java.lang.Object
    implements AndroidInjector<T>
    Performs members-injection on instances of core Android types (e.g. Activity, Fragment) that are constructed by the Android framework and not by Dagger. This class relies on an injected mapping from each concrete class to an AndroidInjector.Factory for an AndroidInjector of that class. Each concrete class must have its own entry in the map, even if it extends another class which is already present in the map. Calls Object.getClass() on the instance in order to find the appropriate AndroidInjector.Factory.