本文整理匯總了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;
}