// Path: app/src/main/java/com/projects/elad/hacklist/injection/components/AppComponent.java
// @HacklistApplicationScope
// @Component(modules = {AppModule.class, NetModule.class})
// public interface AppComponent {
//     void inject(HomePresenter homePresenter);
//     void inject(BookmarksPresenter bookmarksPresenter);
// }
// 
// Path: app/src/main/java/com/projects/elad/hacklist/injection/modules/AppModule.java
// @Module
// public class AppModule {
//     protected final Application application;
//     public AppModule(Application application) {
//         this.application = application;
//     }
// 
//     @Provides
//     Application provideApplication(){
//         return application;
//     }
// 
//     @Provides
//     Context provideContext(){
//         return application;
//     }
// 
//     @Provides
//     @HacklistApplicationScope
//     public RealmBookmarksHelper provideRealmBookmarksHelper(Context context){
//         return new RealmBookmarksHelper(context);
//     }
// 
// 
// 
// 
// }


import android.app.Application;
import android.content.Context;
import com.projects.elad.hacklist.injection.components.AppComponent;
import com.projects.elad.hacklist.injection.components.DaggerAppComponent;
import com.projects.elad.hacklist.injection.modules.AppModule;
package com.projects.elad.hacklist;




/**
 * Created by EladKeyshawn on 24/02/2017.
 */

public class HacklistApplication extends Application {

    private AppComponent appComponent;
    @Override
    public void onCreate() {
        super.onCreate();
    }

    public static HacklistApplication get(Context context) {
        return (HacklistApplication) context.getApplicationContext();
    }

    public AppComponent getComponent() {
        if (appComponent == null) {
            appComponent = DaggerAppComponent.builder()
                    .appModule(new AppModule(this))
                    .build();

        }
        return appComponent;
    }

    // Needed to replace the component with a test specific one
// Path: app/src/main/java/com/projects/elad/hacklist/injection/components/AppComponent.java
// @HacklistApplicationScope
// @Component(modules = {AppModule.class, NetModule.class})
// public interface AppComponent {
//     void inject(HomePresenter homePresenter);
//     void inject(BookmarksPresenter bookmarksPresenter);
// }
// 
// Path: app/src/main/java/com/projects/elad/hacklist/injection/modules/AppModule.java
// @Module
// public class AppModule {
//     protected final Application application;
//     public AppModule(Application application) {
//         this.application = application;
//     }
// 
//     @Provides
//     Application provideApplication(){
//         return application;
//     }
// 
//     @Provides
//     Context provideContext(){
//         return application;
//     }
// 
//     @Provides
//     @HacklistApplicationScope
//     public RealmBookmarksHelper provideRealmBookmarksHelper(Context context){
//         return new RealmBookmarksHelper(context);
//     }
// 
// 
// 
// 
// }


// Path: app/src/main/java/com/projects/elad/hacklist/HacklistApplication.java
import android.app.Application;
import android.content.Context;
import com.projects.elad.hacklist.injection.components.AppComponent;
import com.projects.elad.hacklist.injection.components.DaggerAppComponent;
import com.projects.elad.hacklist.injection.modules.AppModule;

package com.projects.elad.hacklist;




/**
 * Created by EladKeyshawn on 24/02/2017.
 */

public class HacklistApplication extends Application {

    private AppComponent appComponent;
    @Override
    public void onCreate() {
        super.onCreate();
    }

    public static HacklistApplication get(Context context) {
        return (HacklistApplication) context.getApplicationContext();
    }

    public AppComponent getComponent() {
        if (appComponent == null) {
            appComponent = DaggerAppComponent.builder()
                    .appModule(new AppModule(this))
                    .build();

        }
        return appComponent;
    }

    // Needed to replace the component with a test specific one
    public void setComponent(AppComponent appComponent) {