// Path: app/src/main/java/com/txusballesteros/testing/internal/di/ApplicationComponent.java
// public interface ApplicationComponent {
//     Application getApplication();
//     ThreadExecutor getThreadExecutor();
//     PostExecutionThread getPostExecutionThread();
//     ImageLoader getImageLoader();
//     DashboardRepository getDashboardRepository();
// }
// 
// Path: app/src/main/java/com/txusballesteros/testing/internal/di/DependenciesInjector.java
// public interface DependenciesInjector {
//     void inject(MainActivity client);
// }
// 
// Path: app/src/main/java/com/txusballesteros/testing/internal/di/RuntimeApplicationComponent.java
// @Singleton
// @Component(modules = RuntimeApplicationModule.class)
// public interface RuntimeApplicationComponent extends ApplicationComponent {
//     void inject(Application application);
// }
// 
// Path: app/src/main/java/com/txusballesteros/testing/internal/di/RuntimeApplicationModule.java
// @Module( includes = {
//         InstrumentationModule.class,
//         RepositoriesModule.class,
//         DatasourcesModule.class,
//         CachesModule.class,
//         ApiModule.class,
//         TranformerModule.class,
//         EndpointsModule.class
// })
// public class RuntimeApplicationModule implements ApplicationModule {
//     private Application application;
// 
//     public RuntimeApplicationModule(Application application) {
//         this.application = application;
//     }
// 
//     @Override @Provides
//     public Application provideApplication() {
//         return application;
//     }
// 
//     @Override @Provides @Singleton
//     public ThreadExecutor provideThreadExecutor(JobExecutor executor) {
//         return executor;
//     }
// 
//     @Override @Provides @Singleton
//     public PostExecutionThread providePostExecutionThread() {
//         return UIThread.getInstance();
//     }
// 
//     @Override @Provides @Singleton
//     public DependenciesInjector provideDependenciesInjector() {
//         return new RuntimeDependenciesInjector();
//     }
// }
// 
// Path: app/src/main/java/com/txusballesteros/testing/internal/di/RuntimeDependenciesInjector.java
// public class RuntimeDependenciesInjector implements DependenciesInjector {
//     @Override
//     public void inject(MainActivity client) {
//         DaggerRuntimeActivityComponent.builder()
//                 .applicationComponent(getApplicationComponent(client))
//                 .runtimeActivityModule(new RuntimeActivityModule(client))
//                 .viewModule(new ViewModule(client))
//                 .build()
//                 .inject(client);
//     }
// 
//     private ApplicationComponent getApplicationComponent(Activity activity) {
//         return  ((Application)activity.getApplication()).getApplicationComponent();
//     }
// }


import javax.inject.Inject;
import com.txusballesteros.testing.internal.di.ApplicationComponent;
import com.txusballesteros.testing.internal.di.DaggerRuntimeApplicationComponent;
import com.txusballesteros.testing.internal.di.DependenciesInjector;
import com.txusballesteros.testing.internal.di.RuntimeApplicationComponent;
import com.txusballesteros.testing.internal.di.RuntimeApplicationModule;
import com.txusballesteros.testing.internal.di.RuntimeDependenciesInjector;
/*
 * Copyright Txus Ballesteros 2016 (@txusballesteros)
 *
 * This file is part of some open source application.
 *
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you 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.
 *
 * Contact: Txus Ballesteros <txus.ballesteros@gmail.com>
 */
package com.txusballesteros.testing;



public class Application extends android.app.Application {
    private RuntimeApplicationComponent applicationComponent;
    @Inject DependenciesInjector injector;

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

    private void initializeInjection() {
// Path: app/src/main/java/com/txusballesteros/testing/internal/di/ApplicationComponent.java
// public interface ApplicationComponent {
//     Application getApplication();
//     ThreadExecutor getThreadExecutor();
//     PostExecutionThread getPostExecutionThread();
//     ImageLoader getImageLoader();
//     DashboardRepository getDashboardRepository();
// }
// 
// Path: app/src/main/java/com/txusballesteros/testing/internal/di/DependenciesInjector.java
// public interface DependenciesInjector {
//     void inject(MainActivity client);
// }
// 
// Path: app/src/main/java/com/txusballesteros/testing/internal/di/RuntimeApplicationComponent.java
// @Singleton
// @Component(modules = RuntimeApplicationModule.class)
// public interface RuntimeApplicationComponent extends ApplicationComponent {
//     void inject(Application application);
// }
// 
// Path: app/src/main/java/com/txusballesteros/testing/internal/di/RuntimeApplicationModule.java
// @Module( includes = {
//         InstrumentationModule.class,
//         RepositoriesModule.class,
//         DatasourcesModule.class,
//         CachesModule.class,
//         ApiModule.class,
//         TranformerModule.class,
//         EndpointsModule.class
// })
// public class RuntimeApplicationModule implements ApplicationModule {
//     private Application application;
// 
//     public RuntimeApplicationModule(Application application) {
//         this.application = application;
//     }
// 
//     @Override @Provides
//     public Application provideApplication() {
//         return application;
//     }
// 
//     @Override @Provides @Singleton
//     public ThreadExecutor provideThreadExecutor(JobExecutor executor) {
//         return executor;
//     }
// 
//     @Override @Provides @Singleton
//     public PostExecutionThread providePostExecutionThread() {
//         return UIThread.getInstance();
//     }
// 
//     @Override @Provides @Singleton
//     public DependenciesInjector provideDependenciesInjector() {
//         return new RuntimeDependenciesInjector();
//     }
// }
// 
// Path: app/src/main/java/com/txusballesteros/testing/internal/di/RuntimeDependenciesInjector.java
// public class RuntimeDependenciesInjector implements DependenciesInjector {
//     @Override
//     public void inject(MainActivity client) {
//         DaggerRuntimeActivityComponent.builder()
//                 .applicationComponent(getApplicationComponent(client))
//                 .runtimeActivityModule(new RuntimeActivityModule(client))
//                 .viewModule(new ViewModule(client))
//                 .build()
//                 .inject(client);
//     }
// 
//     private ApplicationComponent getApplicationComponent(Activity activity) {
//         return  ((Application)activity.getApplication()).getApplicationComponent();
//     }
// }


// Path: app/src/main/java/com/txusballesteros/testing/Application.java
import javax.inject.Inject;
import com.txusballesteros.testing.internal.di.ApplicationComponent;
import com.txusballesteros.testing.internal.di.DaggerRuntimeApplicationComponent;
import com.txusballesteros.testing.internal.di.DependenciesInjector;
import com.txusballesteros.testing.internal.di.RuntimeApplicationComponent;
import com.txusballesteros.testing.internal.di.RuntimeApplicationModule;
import com.txusballesteros.testing.internal.di.RuntimeDependenciesInjector;

/*
 * Copyright Txus Ballesteros 2016 (@txusballesteros)
 *
 * This file is part of some open source application.
 *
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you 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.
 *
 * Contact: Txus Ballesteros <txus.ballesteros@gmail.com>
 */
package com.txusballesteros.testing;



public class Application extends android.app.Application {
    private RuntimeApplicationComponent applicationComponent;
    @Inject DependenciesInjector injector;

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

    private void initializeInjection() {
        applicationComponent = DaggerRuntimeApplicationComponent.builder()