@Beta public final class AndroidInjection extends Object
| Modifier and Type | Method and Description | 
|---|---|
| static void | inject(Activity activity)Injects  activityif an associatedAndroidInjectorimplementation can be found,
 otherwise throws anIllegalArgumentException. | 
| static void | inject(BroadcastReceiver broadcastReceiver,
      Context context)Injects  broadcastReceiverif an associatedAndroidInjectorimplementation can
 be found, otherwise throws anIllegalArgumentException. | 
| static void | inject(ContentProvider contentProvider)Injects  contentProviderif an associatedAndroidInjectorimplementation can be
 found, otherwise throws anIllegalArgumentException. | 
| static void | inject(Fragment fragment)Injects  fragmentif an associatedAndroidInjectorimplementation can be found,
 otherwise throws anIllegalArgumentException. | 
| static void | inject(Service service)Injects  serviceif an associatedAndroidInjectorimplementation can be found,
 otherwise throws anIllegalArgumentException. | 
public static void inject(Activity activity)
activity if an associated AndroidInjector implementation can be found,
 otherwise throws an IllegalArgumentException.RuntimeException - if the Application doesn't implement HasActivityInjector.public static void inject(Fragment fragment)
fragment if an associated AndroidInjector implementation can be found,
 otherwise throws an IllegalArgumentException.
 Uses the following algorithm to find the appropriate AndroidInjector<Fragment> to
 use to inject fragment:
 
HasFragmentInjector, and if none do
   fragment's activity if it implements
       HasFragmentInjector, and if not
   Application if it implements HasFragmentInjector.
 HasFragmentInjector, a IllegalArgumentException is
 thrown.IllegalArgumentException - if no parent fragment, activity, or application implements
     HasFragmentInjector.public static void inject(Service service)
service if an associated AndroidInjector implementation can be found,
 otherwise throws an IllegalArgumentException.RuntimeException - if the Application doesn't implement HasServiceInjector.public static void inject(BroadcastReceiver broadcastReceiver, Context context)
broadcastReceiver if an associated AndroidInjector implementation can
 be found, otherwise throws an IllegalArgumentException.RuntimeException - if the Application from Context.getApplicationContext() doesn't implement HasBroadcastReceiverInjector.public static void inject(ContentProvider contentProvider)
contentProvider if an associated AndroidInjector implementation can be
 found, otherwise throws an IllegalArgumentException.RuntimeException - if the Application doesn't implement HasContentProviderInjector.Copyright © 2012–2017 The Dagger Authors. All rights reserved.