當前位置: 首頁>>代碼示例>>Java>>正文


Java AppScope類代碼示例

本文整理匯總了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();
}
 
開發者ID:AleksanderMielczarek,項目名稱:RealmRepository,代碼行數:9,代碼來源:MainModule.java

示例2: provideContext

import com.github.aleksandermielczarek.napkin.scope.AppScope; //導入依賴的package包/類
@Override
@Provides
@AppScope
@ContextApp
public Context provideContext() {
    return application;
}
 
開發者ID:AleksanderMielczarek,項目名稱:Napkin,代碼行數:8,代碼來源:NapkinAppModule.java

示例3: provideContext

import com.github.aleksandermielczarek.napkin.scope.AppScope; //導入依賴的package包/類
@Override
@Provides
@AppScope
@AppContext
public Context provideContext() {
    return application;
}
 
開發者ID:AleksanderMielczarek,項目名稱:Napkin,代碼行數:8,代碼來源:NapkinAppModule.java

示例4: provideRepositoryConfiguration

import com.github.aleksandermielczarek.napkin.scope.AppScope; //導入依賴的package包/類
@Provides
@AppScope
RealmRepositoryConfiguration provideRepositoryConfiguration() {
    return RealmRepositoryConfiguration.getDefault();
}
 
開發者ID:AleksanderMielczarek,項目名稱:RealmRepository,代碼行數:6,代碼來源:MainModule.java

示例5: provideUserRepository

import com.github.aleksandermielczarek.napkin.scope.AppScope; //導入依賴的package包/類
@Provides
@AppScope
UserRepository provideUserRepository(RealmRepositoryConfiguration repositoryConfiguration) {
    return new UserRepositoryImpl(repositoryConfiguration);
}
 
開發者ID:AleksanderMielczarek,項目名稱:RealmRepository,代碼行數:6,代碼來源:MainModule.java

示例6: provideObservableCache

import com.github.aleksandermielczarek.napkin.scope.AppScope; //導入依賴的package包/類
@Provides
@AppScope
ObservableCache provideObservableCache() {
    return LruObservableCache.newInstance();
}
 
開發者ID:AleksanderMielczarek,項目名稱:ObservableCache,代碼行數:6,代碼來源:Observable1Module.java

示例7: provideObservableService

import com.github.aleksandermielczarek.napkin.scope.AppScope; //導入依賴的package包/類
@Provides
@AppScope
Observable1Service provideObservableService() {
    return new Observable1Service();
}
 
開發者ID:AleksanderMielczarek,項目名稱:ObservableCache,代碼行數:6,代碼來源:Observable1Module.java

示例8: provideObservableCacheService

import com.github.aleksandermielczarek.napkin.scope.AppScope; //導入依賴的package包/類
@Provides
@AppScope
ObservableCacheService provideObservableCacheService(ObservableCache observableCache) {
    return new ObservableCacheService(observableCache);
}
 
開發者ID:AleksanderMielczarek,項目名稱:ObservableCache,代碼行數:6,代碼來源:Observable1Module.java

示例9: provideCachedService

import com.github.aleksandermielczarek.napkin.scope.AppScope; //導入依賴的package包/類
@Provides
@AppScope
Cached1Service provideCachedService(ObservableCacheService observableCacheService) {
    return observableCacheService.createObservableCacheService(Cached1Service.class);
}
 
開發者ID:AleksanderMielczarek,項目名稱:ObservableCache,代碼行數:6,代碼來源:Observable1Module.java

示例10: provideObservableService

import com.github.aleksandermielczarek.napkin.scope.AppScope; //導入依賴的package包/類
@Provides
@AppScope
Observable2Service provideObservableService() {
    return new Observable2Service();
}
 
開發者ID:AleksanderMielczarek,項目名稱:ObservableCache,代碼行數:6,代碼來源:Observable2Module.java

示例11: provideCachedService

import com.github.aleksandermielczarek.napkin.scope.AppScope; //導入依賴的package包/類
@Provides
@AppScope
Cached2Service provideCachedService(ObservableCacheService observableCacheService) {
    return observableCacheService.createObservableCacheService(Cached2Service.class);
}
 
開發者ID:AleksanderMielczarek,項目名稱:ObservableCache,代碼行數:6,代碼來源:Observable2Module.java

示例12: provideApplication

import com.github.aleksandermielczarek.napkin.scope.AppScope; //導入依賴的package包/類
@Override
@Provides
@AppScope
public Application provideApplication() {
    return application;
}
 
開發者ID:AleksanderMielczarek,項目名稱:Napkin,代碼行數:7,代碼來源:NapkinAppModule.java


注:本文中的com.github.aleksandermielczarek.napkin.scope.AppScope類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。