// Path: app/src/main/java/sergio/vasco/realmforandroid/app/di/components/AppComponent.java
// @Singleton @Component(modules = {AppModule.class, DataModule.class, InteractorModule.class,
//     RepositoryModule.class, DataSourceModule.class, MapperModule.class})
// public interface AppComponent extends InteractorComponent, DataComponent,
//     DataSourceComponent, RepositoryComponent, MapperComponent {
//   void inject(App app);
// }
// 
// Path: app/src/main/java/sergio/vasco/realmforandroid/app/di/modules/AppModule.java
// @Module
// public class AppModule {
// 
//   private final App app;
// 
//   public AppModule(App app) {
//     this.app = app;
//   }
// 
//   @Singleton @Provides Application provideApplication(){
//     return app;
//   }
// }


import android.app.Application;
import sergio.vasco.realmforandroid.app.di.components.AppComponent;
import sergio.vasco.realmforandroid.app.di.components.DaggerAppComponent;
import sergio.vasco.realmforandroid.app.di.modules.AppModule;
package sergio.vasco.realmforandroid.app;




/**
 * Name: Sergio Vasco
 * Date: 15/1/16.
 */
public class App extends Application {

  private AppComponent appComponent;

  @Override public void onCreate() {
    super.onCreate();
    initDI();
  }

  private void initDI() {
    initAppComponent();
  }

  private void initAppComponent() {
// Path: app/src/main/java/sergio/vasco/realmforandroid/app/di/components/AppComponent.java
// @Singleton @Component(modules = {AppModule.class, DataModule.class, InteractorModule.class,
//     RepositoryModule.class, DataSourceModule.class, MapperModule.class})
// public interface AppComponent extends InteractorComponent, DataComponent,
//     DataSourceComponent, RepositoryComponent, MapperComponent {
//   void inject(App app);
// }
// 
// Path: app/src/main/java/sergio/vasco/realmforandroid/app/di/modules/AppModule.java
// @Module
// public class AppModule {
// 
//   private final App app;
// 
//   public AppModule(App app) {
//     this.app = app;
//   }
// 
//   @Singleton @Provides Application provideApplication(){
//     return app;
//   }
// }


// Path: app/src/main/java/sergio/vasco/realmforandroid/app/App.java
import android.app.Application;
import sergio.vasco.realmforandroid.app.di.components.AppComponent;
import sergio.vasco.realmforandroid.app.di.components.DaggerAppComponent;
import sergio.vasco.realmforandroid.app.di.modules.AppModule;

package sergio.vasco.realmforandroid.app;




/**
 * Name: Sergio Vasco
 * Date: 15/1/16.
 */
public class App extends Application {

  private AppComponent appComponent;

  @Override public void onCreate() {
    super.onCreate();
    initDI();
  }

  private void initDI() {
    initAppComponent();
  }

  private void initAppComponent() {
    appComponent = DaggerAppComponent.builder().appModule(new AppModule(this)).build();