本文整理汇总了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;
}