当前位置: 首页>>代码示例>>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;未经允许,请勿转载。