本文整理汇总了Java中com.github.aleksandermielczarek.napkin.scope.AppScope类的典型用法代码示例。如果您正苦于以下问题:Java AppScope类的具体用法?Java AppScope怎么用?Java AppScope使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
AppScope类属于com.github.aleksandermielczarek.napkin.scope包,在下文中一共展示了AppScope类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: provideRealmConfiguration
import com.github.aleksandermielczarek.napkin.scope.AppScope; //导入依赖的package包/类
@Provides
@AppScope
RealmConfiguration provideRealmConfiguration(@AppContext Context context) {
Realm.init(context);
return new RealmConfiguration.Builder()
.deleteRealmIfMigrationNeeded()
.build();
}
示例2: provideContext
import com.github.aleksandermielczarek.napkin.scope.AppScope; //导入依赖的package包/类
@Override
@Provides
@AppScope
@ContextApp
public Context provideContext() {
return application;
}
示例3: provideContext
import com.github.aleksandermielczarek.napkin.scope.AppScope; //导入依赖的package包/类
@Override
@Provides
@AppScope
@AppContext
public Context provideContext() {
return application;
}
示例4: provideRepositoryConfiguration
import com.github.aleksandermielczarek.napkin.scope.AppScope; //导入依赖的package包/类
@Provides
@AppScope
RealmRepositoryConfiguration provideRepositoryConfiguration() {
return RealmRepositoryConfiguration.getDefault();
}
示例5: provideUserRepository
import com.github.aleksandermielczarek.napkin.scope.AppScope; //导入依赖的package包/类
@Provides
@AppScope
UserRepository provideUserRepository(RealmRepositoryConfiguration repositoryConfiguration) {
return new UserRepositoryImpl(repositoryConfiguration);
}
示例6: provideObservableCache
import com.github.aleksandermielczarek.napkin.scope.AppScope; //导入依赖的package包/类
@Provides
@AppScope
ObservableCache provideObservableCache() {
return LruObservableCache.newInstance();
}
示例7: provideObservableService
import com.github.aleksandermielczarek.napkin.scope.AppScope; //导入依赖的package包/类
@Provides
@AppScope
Observable1Service provideObservableService() {
return new Observable1Service();
}
示例8: provideObservableCacheService
import com.github.aleksandermielczarek.napkin.scope.AppScope; //导入依赖的package包/类
@Provides
@AppScope
ObservableCacheService provideObservableCacheService(ObservableCache observableCache) {
return new ObservableCacheService(observableCache);
}
示例9: provideCachedService
import com.github.aleksandermielczarek.napkin.scope.AppScope; //导入依赖的package包/类
@Provides
@AppScope
Cached1Service provideCachedService(ObservableCacheService observableCacheService) {
return observableCacheService.createObservableCacheService(Cached1Service.class);
}
示例10: provideObservableService
import com.github.aleksandermielczarek.napkin.scope.AppScope; //导入依赖的package包/类
@Provides
@AppScope
Observable2Service provideObservableService() {
return new Observable2Service();
}
示例11: provideCachedService
import com.github.aleksandermielczarek.napkin.scope.AppScope; //导入依赖的package包/类
@Provides
@AppScope
Cached2Service provideCachedService(ObservableCacheService observableCacheService) {
return observableCacheService.createObservableCacheService(Cached2Service.class);
}
示例12: provideApplication
import com.github.aleksandermielczarek.napkin.scope.AppScope; //导入依赖的package包/类
@Override
@Provides
@AppScope
public Application provideApplication() {
return application;
}