// Path: app/src/main/java/leonardo2204/com/br/flowtests/FlowTestApplication.java
// public class FlowTestApplication extends Application {
// 
//     private MortarScope mortarScope;
// 
//     @Override
//     public Object getSystemService(String name) {
//         if(mortarScope == null){
//             setupMortar();
//         }
// 
//         return (mortarScope.hasService(name)) ? mortarScope.getService(name) : super.getSystemService(name);
//     }
// 
//     @Override
//     public void onCreate() {
//         super.onCreate();
//         LeakCanary.install(this);
//     }
// 
//     private void setupMortar(){
//         AppComponent component = DaggerAppComponent
//                 .builder()
//                 .appModule(new AppModule(this))
//                 .build();
// 
//         component.inject(this);
// 
//         mortarScope = MortarScope.buildRootScope()
//                 .withService(DaggerService.SERVICE_NAME,component)
//                 .build("Root");
//     }
// 
// }
// 
// Path: app/src/main/java/leonardo2204/com/br/flowtests/di/module/AppModule.java
// @Module
// public class AppModule {
// 
//     private final static String SHARED_NAME = "global_config";
//     private final Application application;
// 
//     public AppModule(Application application) {
//         this.application = application;
//     }
// 
//     @Provides
//     @ApplicationScope
//     public Application providesApplication() {
//         return application;
//     }
// 
//     @Provides
//     @ApplicationScope
//     public UIThread provideUIThread() {
//         return new UIThread();
//     }
// 
//     @Provides
//     @ApplicationScope
//     public ThreadExecutor provideThreadExecutor(JobExecutor jobExecutor) {
//         return jobExecutor;
//     }
// 
//     @Provides
//     @ApplicationScope
//     public PostExecutionThread providePostExecutionThread(UIThread uiThread) {
//         return uiThread;
//     }
// 
//     @Provides
//     @ApplicationScope
//     public ContentResolver providesContentResolver() {
//         return this.application.getContentResolver();
//     }
// 
//     @Provides
//     @ApplicationScope
//     public ContactsRepository providesContactsRepository(ContentResolver contentResolver) {
//         return new ContactsRepositoryImpl(contentResolver);
//     }
// 
//     @Provides
//     @ApplicationScope
//     public SharedPreferences providesSharedPreferences() {
//         return this.application.getSharedPreferences(SHARED_NAME, Context.MODE_PRIVATE);
//     }
// }


import android.content.SharedPreferences;
import dagger.Component;
import leonardo2204.com.br.flowtests.FlowTestApplication;
import leonardo2204.com.br.flowtests.UIThread;
import leonardo2204.com.br.flowtests.di.module.AppModule;
import leonardo2204.com.br.flowtests.di.scope.ApplicationScope;
import leonardo2204.com.br.flowtests.domain.executor.PostExecutionThread;
import leonardo2204.com.br.flowtests.domain.executor.ThreadExecutor;
import leonardo2204.com.br.flowtests.domain.repository.ContactsRepository;
package leonardo2204.com.br.flowtests.di.component;



/**
 * Created by Leonardo on 04/03/2016.
 */
@ApplicationScope
@Component(modules = AppModule.class)
public interface AppComponent {
// Path: app/src/main/java/leonardo2204/com/br/flowtests/FlowTestApplication.java
// public class FlowTestApplication extends Application {
// 
//     private MortarScope mortarScope;
// 
//     @Override
//     public Object getSystemService(String name) {
//         if(mortarScope == null){
//             setupMortar();
//         }
// 
//         return (mortarScope.hasService(name)) ? mortarScope.getService(name) : super.getSystemService(name);
//     }
// 
//     @Override
//     public void onCreate() {
//         super.onCreate();
//         LeakCanary.install(this);
//     }
// 
//     private void setupMortar(){
//         AppComponent component = DaggerAppComponent
//                 .builder()
//                 .appModule(new AppModule(this))
//                 .build();
// 
//         component.inject(this);
// 
//         mortarScope = MortarScope.buildRootScope()
//                 .withService(DaggerService.SERVICE_NAME,component)
//                 .build("Root");
//     }
// 
// }
// 
// Path: app/src/main/java/leonardo2204/com/br/flowtests/di/module/AppModule.java
// @Module
// public class AppModule {
// 
//     private final static String SHARED_NAME = "global_config";
//     private final Application application;
// 
//     public AppModule(Application application) {
//         this.application = application;
//     }
// 
//     @Provides
//     @ApplicationScope
//     public Application providesApplication() {
//         return application;
//     }
// 
//     @Provides
//     @ApplicationScope
//     public UIThread provideUIThread() {
//         return new UIThread();
//     }
// 
//     @Provides
//     @ApplicationScope
//     public ThreadExecutor provideThreadExecutor(JobExecutor jobExecutor) {
//         return jobExecutor;
//     }
// 
//     @Provides
//     @ApplicationScope
//     public PostExecutionThread providePostExecutionThread(UIThread uiThread) {
//         return uiThread;
//     }
// 
//     @Provides
//     @ApplicationScope
//     public ContentResolver providesContentResolver() {
//         return this.application.getContentResolver();
//     }
// 
//     @Provides
//     @ApplicationScope
//     public ContactsRepository providesContactsRepository(ContentResolver contentResolver) {
//         return new ContactsRepositoryImpl(contentResolver);
//     }
// 
//     @Provides
//     @ApplicationScope
//     public SharedPreferences providesSharedPreferences() {
//         return this.application.getSharedPreferences(SHARED_NAME, Context.MODE_PRIVATE);
//     }
// }


// Path: app/src/main/java/leonardo2204/com/br/flowtests/di/component/AppComponent.java
import android.content.SharedPreferences;
import dagger.Component;
import leonardo2204.com.br.flowtests.FlowTestApplication;
import leonardo2204.com.br.flowtests.UIThread;
import leonardo2204.com.br.flowtests.di.module.AppModule;
import leonardo2204.com.br.flowtests.di.scope.ApplicationScope;
import leonardo2204.com.br.flowtests.domain.executor.PostExecutionThread;
import leonardo2204.com.br.flowtests.domain.executor.ThreadExecutor;
import leonardo2204.com.br.flowtests.domain.repository.ContactsRepository;

package leonardo2204.com.br.flowtests.di.component;



/**
 * Created by Leonardo on 04/03/2016.
 */
@ApplicationScope
@Component(modules = AppModule.class)
public interface AppComponent {
    void inject(FlowTestApplication flowTestApplication);