本文整理匯總了Java中dagger.android.AndroidInjector類的典型用法代碼示例。如果您正苦於以下問題:Java AndroidInjector類的具體用法?Java AndroidInjector怎麽用?Java AndroidInjector使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
AndroidInjector類屬於dagger.android包,在下文中一共展示了AndroidInjector類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: get
import dagger.android.AndroidInjector; //導入依賴的package包/類
@Override
public AndroidInjector<T> get(T instance) {
//noinspection SuspiciousMethodCalls
Provider<AndroidInjector.Factory<? extends T>> factoryProvider = injectorFactories.get(instance.getClass());
if (factoryProvider == null) {
throw new IllegalArgumentException("No injector available for " + instance);
}
@SuppressWarnings("unchecked")
AndroidInjector.Factory<T> factory = (AndroidInjector.Factory<T>) factoryProvider.get();
return checkNotNull(
factory.create(instance),
"%s.create(I) should not return null.",
factory.getClass().getCanonicalName());
}
示例2: applicationInjector
import dagger.android.AndroidInjector; //導入依賴的package包/類
@Override
protected AndroidInjector<? extends DaggerApplication> applicationInjector()
{
return DaggerAppComponent
.builder()
.appModule(new AppModule(this))
.build();
}
示例3: supportFragmentInjector
import dagger.android.AndroidInjector; //導入依賴的package包/類
@Override public AndroidInjector<Fragment> supportFragmentInjector() {
return androidInjector;
}
示例4: activityInjector
import dagger.android.AndroidInjector; //導入依賴的package包/類
@Override public AndroidInjector<Activity> activityInjector() {
return dispatchingAndroidInjector;
}
示例5: applicationInjector
import dagger.android.AndroidInjector; //導入依賴的package包/類
@Override
protected AndroidInjector<? extends DaggerApplication> applicationInjector() {
return DaggerImgurApplicationComponent.create();
}
示例6: supportFragmentInjector
import dagger.android.AndroidInjector; //導入依賴的package包/類
@Override
public AndroidInjector<Fragment> supportFragmentInjector() {
return fragmentInjector;
}
示例7: supportFragmentInjector
import dagger.android.AndroidInjector; //導入依賴的package包/類
@Override
public AndroidInjector<Fragment> supportFragmentInjector() {
return childFragmentInjector;
}
示例8: activityInjector
import dagger.android.AndroidInjector; //導入依賴的package包/類
@Override
public AndroidInjector<Activity> activityInjector() {
return activityDispatchingAndroidInjector;
}
示例9: activityInjector
import dagger.android.AndroidInjector; //導入依賴的package包/類
@Override
public AndroidInjector<Activity> activityInjector() {
return activityDispatchingAndroidInjector;
}
示例10: activityInjector
import dagger.android.AndroidInjector; //導入依賴的package包/類
@Override
public AndroidInjector<Activity> activityInjector() {
return activityAndroidInjector;
}
示例11: supportFragmentInjector
import dagger.android.AndroidInjector; //導入依賴的package包/類
@Override
public AndroidInjector<Fragment> supportFragmentInjector() {
return dispatchingFragmentInjector;
}
示例12: applicationInjector
import dagger.android.AndroidInjector; //導入依賴的package包/類
@Override
protected AndroidInjector<App> applicationInjector() {
return DaggerAppComponent.builder().create(this);
}
示例13: counting
import dagger.android.AndroidInjector; //導入依賴的package包/類
@Binds
@IntoMap
@FragmentKey(CountingFragment.class)
abstract AndroidInjector.Factory<? extends Fragment> counting(CountingComponent.Builder impl);
示例14: mainActivity
import dagger.android.AndroidInjector; //導入依賴的package包/類
@Binds
@IntoMap
@ActivityKey(MainActivity.class)
abstract AndroidInjector.Factory<? extends android.app.Activity> mainActivity(MainComponent.Builder impl);
示例15: get
import dagger.android.AndroidInjector; //導入依賴的package包/類
@Override
public AndroidInjector get(Fragment fragment) {
return component;
}