Skip to content

Instantly share code, notes, and snippets.

@goofyahead
Last active April 4, 2017 07:21
Show Gist options
  • Save goofyahead/42a97f313dd66dfe03c2be172658db96 to your computer and use it in GitHub Desktop.
Save goofyahead/42a97f313dd66dfe03c2be172658db96 to your computer and use it in GitHub Desktop.
/**
* Contains bindings to ensure the usability of {@code dagger.android} framework classes. This
* module should be installed in the component that is used to inject the {@link
* android.app.Application} class.
*/
@Beta
@Module
public abstract class AndroidInjectionModule {
@Multibinds
abstract Map<Class<? extends Activity>, AndroidInjector.Factory<? extends Activity>>
activityInjectorFactories();
@Multibinds
abstract Map<Class<? extends Fragment>, AndroidInjector.Factory<? extends Fragment>>
fragmentInjectorFactories();
@Multibinds
abstract Map<Class<? extends Service>, AndroidInjector.Factory<? extends Service>>
serviceInjectorFactories();
@Multibinds
abstract Map<
Class<? extends BroadcastReceiver>, AndroidInjector.Factory<? extends BroadcastReceiver>>
broadcastReceiverInjectorFactories();
private AndroidInjectionModule() {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment