// Path: android/src/main/java/com/raulh82vlc/TransactionsViewer/di/modules/ApplicationModule.java
// @Module
// public class ApplicationModule {
//     private final Application application;
// 
//     public ApplicationModule(Application application) {
//         this.application = application;
//     }
// 
//     @Provides
//     @Singleton
//     Application provideApplication() {
//         return application;
//     }
// 
//     @Provides
//     @Singleton
//     InteractorExecutor provideThreadsPoolExecutor(ThreadsPoolExecutor executor) {
//         return executor;
//     }
// 
//     @Provides
//     @Singleton
//     MainThread providePostExecutionThread(MainThreadImpl mainThread) {
//         return mainThread;
//     }
// 
//     @Provides
//     @Singleton
//     Context provideApplicationContext() {
//         return application.getApplicationContext();
//     }
// }
// 
// Path: android/src/main/java/com/raulh82vlc/TransactionsViewer/di/components/ApplicationComponent.java
// @Singleton
// @Component(
//         modules = {
//                 ApplicationModule.class,
//                 RepositoryModule.class
//         })
// public interface ApplicationComponent {
// 
//     /**
//      * Injections for the dependencies
//      */
//     void inject(TransactionsViewerApp app);
// 
//     void inject(Context context);
// 
//     /**
//      * Used in child components
//      */
//     Application application();
// 
//     /**
//      * Background processes executor (interactors use this)
//      */
//     InteractorExecutor threadExecutor();
// 
//     /**
//      * Direct contact to UI thread
//      */
//     MainThread mainThread();
// 
//     /**
//      * Direct contact to repo
//      */
//     DataRepository dataRepo();
// }


import android.app.Application;
import com.raulh82vlc.TransactionsViewer.di.modules.ApplicationModule;
import com.raulh82vlc.TransactionsViewer.di.components.ApplicationComponent;
import com.raulh82vlc.TransactionsViewer.di.components.DaggerApplicationComponent;
/*
 * Copyright (C) 2017 Raul Hernandez Lopez @raulh82vlc
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.raulh82vlc.TransactionsViewer;



/**
 * {@link ApplicationComponent} could be used to provide dependencies needed by the whole app
 * execution. Application context linked dependencies would be exposed by it too.
 *
 * @author Raul Hernandez Lopez
 */
public class TransactionsViewerApp extends Application {

    private ApplicationComponent applicationComponent;

    @Override
    public void onCreate() {
        super.onCreate();
        applicationComponent = DaggerApplicationComponent.builder()
// Path: android/src/main/java/com/raulh82vlc/TransactionsViewer/di/modules/ApplicationModule.java
// @Module
// public class ApplicationModule {
//     private final Application application;
// 
//     public ApplicationModule(Application application) {
//         this.application = application;
//     }
// 
//     @Provides
//     @Singleton
//     Application provideApplication() {
//         return application;
//     }
// 
//     @Provides
//     @Singleton
//     InteractorExecutor provideThreadsPoolExecutor(ThreadsPoolExecutor executor) {
//         return executor;
//     }
// 
//     @Provides
//     @Singleton
//     MainThread providePostExecutionThread(MainThreadImpl mainThread) {
//         return mainThread;
//     }
// 
//     @Provides
//     @Singleton
//     Context provideApplicationContext() {
//         return application.getApplicationContext();
//     }
// }
// 
// Path: android/src/main/java/com/raulh82vlc/TransactionsViewer/di/components/ApplicationComponent.java
// @Singleton
// @Component(
//         modules = {
//                 ApplicationModule.class,
//                 RepositoryModule.class
//         })
// public interface ApplicationComponent {
// 
//     /**
//      * Injections for the dependencies
//      */
//     void inject(TransactionsViewerApp app);
// 
//     void inject(Context context);
// 
//     /**
//      * Used in child components
//      */
//     Application application();
// 
//     /**
//      * Background processes executor (interactors use this)
//      */
//     InteractorExecutor threadExecutor();
// 
//     /**
//      * Direct contact to UI thread
//      */
//     MainThread mainThread();
// 
//     /**
//      * Direct contact to repo
//      */
//     DataRepository dataRepo();
// }


// Path: android/src/main/java/com/raulh82vlc/TransactionsViewer/TransactionsViewerApp.java
import android.app.Application;
import com.raulh82vlc.TransactionsViewer.di.modules.ApplicationModule;
import com.raulh82vlc.TransactionsViewer.di.components.ApplicationComponent;
import com.raulh82vlc.TransactionsViewer.di.components.DaggerApplicationComponent;

/*
 * Copyright (C) 2017 Raul Hernandez Lopez @raulh82vlc
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.raulh82vlc.TransactionsViewer;



/**
 * {@link ApplicationComponent} could be used to provide dependencies needed by the whole app
 * execution. Application context linked dependencies would be exposed by it too.
 *
 * @author Raul Hernandez Lopez
 */
public class TransactionsViewerApp extends Application {

    private ApplicationComponent applicationComponent;

    @Override
    public void onCreate() {
        super.onCreate();
        applicationComponent = DaggerApplicationComponent.builder()
                .applicationModule(new ApplicationModule(this))