// Path: privvy/src/main/java/com/metova/privvy/PrivvyHost.java
// public interface PrivvyHost {
// 
//     void initialize(RouteData... routes);
// 
//     void replace(RouteData oldComponent, RouteData newComponent);
// 
//     void goTo(RouteData newComponent);
// }
// 
// Path: privvy/src/main/java/com/metova/privvy/PrivvyHostDelegate.java
// public class PrivvyHostDelegate implements PrivvyHost {
// 
//     private AppCompatActivity hostActivity;
// 
//     public PrivvyHostDelegate(AppCompatActivity hostActivity) {
//         this.hostActivity = hostActivity;
//     }
// 
//     @Override
//     public void initialize(RouteData... routeData) {
//         for (RouteData data : routeData) {
//             startComponent(data);
//         }
//     }
// 
//     private void startComponent(RouteData routeData) {
//         switch (routeData.viewType()) {
//             case ACTIVITY:
//                 goTo(routeData);
//                 break;
//             case FRAGMENT:
//                 startFragment(routeData);
//                 break;
//         }
//     }
// 
//     @Override
//     public void goTo(RouteData newComponent) {
//         hostActivity.startActivity(new Intent(hostActivity, newComponent.viewClass()));
//     }
// 
//     private void startFragment(RouteData routeData) {
//         commitFragmentTransaction(routeData.viewId(), routeData.viewClass(), routeData.tag());
//     }
// 
//     @Override
//     public void replace(RouteData oldComponent, RouteData newComponent) {
//         commitFragmentTransaction(oldComponent.viewId(), newComponent.viewClass(), newComponent.tag());
//     }
// 
//     @SuppressWarnings("TryWithIdenticalCatches")
//     private void commitFragmentTransaction(@IdRes int viewId, Class<?> fragmentClass, String tag) {
//         try {
//             FragmentTransaction ft = hostActivity.getSupportFragmentManager().beginTransaction();
//             ft.replace(viewId, (Fragment) fragmentClass.newInstance(), tag);
//             ft.commit();
//         } catch (InstantiationException e) {
//             e.printStackTrace();
//         } catch (IllegalAccessException e) {
//             e.printStackTrace();
//         }
//     }
// }
// 
// Path: privvy/src/main/java/com/metova/privvy/RouteData.java
// @AutoValue
// public abstract class RouteData {
// 
//     public abstract ViewType viewType();
//     public abstract Class<?> viewClass();
//     public abstract int viewId();
// 
//     public static Builder Builder() {
//         return new AutoValue_RouteData.Builder().viewId(0);
//     }
// 
//     public String tag() {
//         return viewClass().getSimpleName();
//     }
// 
//     @AutoValue.Builder
//     public interface Builder {
//         Builder viewType(ViewType viewType);
//         Builder viewClass(Class<?> viewClass);
//         Builder viewId(@IdRes int viewId);
//         RouteData build();
//     }
// }
// 
// Path: sample/src/main/java/com/metova/privvy/sample/SampleApplication.java
// public class SampleApplication extends Application {
// 
//     public static ApplicationComponent component;
// 
// 
//     @Override
//     public void onCreate() {
//         super.onCreate();
// 
//         if (BuildConfig.DEBUG) {
//             Timber.plant(new Timber.DebugTree());
//         }
// 
//         component = buildComponent();
//     }
// 
//     protected ApplicationComponent buildComponent() {
//         Timber.d("Building actual component");
//         return DaggerApplicationComponent.builder()
//                 .applicationModule(new ApplicationModule(this)).build();
//     }
// }
// 
// Path: sample/src/main/java/com/metova/privvy/sample/di/HostComponent.java
// @HostScope
// @Subcomponent(modules = {HostModule.class, YokeModule.class})
// public interface HostComponent {
// 
//     PrivvyComponent newPrivvyComponent();
// 
//     @Subcomponent.Builder
//     interface Builder {
// 
//         HostComponent.Builder hostModule(HostModule module);
// 
//         HostComponent build();
//     }
// }
// 
// Path: sample/src/main/java/com/metova/privvy/sample/di/HostModule.java
// @Module
// public class HostModule {
// 
//     private final PrivvyHost host;
// 
//     public HostModule(PrivvyHost host) {
//         this.host = host;
//     }
// 
//     @Provides
//     @HostScope
//     PrivvyHost provideHost() {
//         return host;
//     }
// }


import com.metova.privvy.PrivvyHost;
import com.metova.privvy.PrivvyHostDelegate;
import com.metova.privvy.RouteData;
import com.metova.privvy.sample.R;
import com.metova.privvy.sample.SampleApplication;
import com.metova.privvy.sample.di.HostComponent;
import com.metova.privvy.sample.di.HostModule;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import java.util.List;
import javax.inject.Inject;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
package com.metova.privvy.sample.ui.list;






public class ListActivity extends AppCompatActivity implements PrivvyHost, ListContract.View, ListAdapter.ListClickCallback {

    @Inject
    ListComponent listComponent;

    PrivvyHostDelegate hostDelegate;

    @BindView(R.id.list_recyclerview)
    RecyclerView numberList;

    private ListContract.Presenter presenter;

    private ListAdapter listAdapter = new ListAdapter(this);

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        HostComponent hostComponent = SampleApplication.component.newHost()
// Path: privvy/src/main/java/com/metova/privvy/PrivvyHost.java
// public interface PrivvyHost {
// 
//     void initialize(RouteData... routes);
// 
//     void replace(RouteData oldComponent, RouteData newComponent);
// 
//     void goTo(RouteData newComponent);
// }
// 
// Path: privvy/src/main/java/com/metova/privvy/PrivvyHostDelegate.java
// public class PrivvyHostDelegate implements PrivvyHost {
// 
//     private AppCompatActivity hostActivity;
// 
//     public PrivvyHostDelegate(AppCompatActivity hostActivity) {
//         this.hostActivity = hostActivity;
//     }
// 
//     @Override
//     public void initialize(RouteData... routeData) {
//         for (RouteData data : routeData) {
//             startComponent(data);
//         }
//     }
// 
//     private void startComponent(RouteData routeData) {
//         switch (routeData.viewType()) {
//             case ACTIVITY:
//                 goTo(routeData);
//                 break;
//             case FRAGMENT:
//                 startFragment(routeData);
//                 break;
//         }
//     }
// 
//     @Override
//     public void goTo(RouteData newComponent) {
//         hostActivity.startActivity(new Intent(hostActivity, newComponent.viewClass()));
//     }
// 
//     private void startFragment(RouteData routeData) {
//         commitFragmentTransaction(routeData.viewId(), routeData.viewClass(), routeData.tag());
//     }
// 
//     @Override
//     public void replace(RouteData oldComponent, RouteData newComponent) {
//         commitFragmentTransaction(oldComponent.viewId(), newComponent.viewClass(), newComponent.tag());
//     }
// 
//     @SuppressWarnings("TryWithIdenticalCatches")
//     private void commitFragmentTransaction(@IdRes int viewId, Class<?> fragmentClass, String tag) {
//         try {
//             FragmentTransaction ft = hostActivity.getSupportFragmentManager().beginTransaction();
//             ft.replace(viewId, (Fragment) fragmentClass.newInstance(), tag);
//             ft.commit();
//         } catch (InstantiationException e) {
//             e.printStackTrace();
//         } catch (IllegalAccessException e) {
//             e.printStackTrace();
//         }
//     }
// }
// 
// Path: privvy/src/main/java/com/metova/privvy/RouteData.java
// @AutoValue
// public abstract class RouteData {
// 
//     public abstract ViewType viewType();
//     public abstract Class<?> viewClass();
//     public abstract int viewId();
// 
//     public static Builder Builder() {
//         return new AutoValue_RouteData.Builder().viewId(0);
//     }
// 
//     public String tag() {
//         return viewClass().getSimpleName();
//     }
// 
//     @AutoValue.Builder
//     public interface Builder {
//         Builder viewType(ViewType viewType);
//         Builder viewClass(Class<?> viewClass);
//         Builder viewId(@IdRes int viewId);
//         RouteData build();
//     }
// }
// 
// Path: sample/src/main/java/com/metova/privvy/sample/SampleApplication.java
// public class SampleApplication extends Application {
// 
//     public static ApplicationComponent component;
// 
// 
//     @Override
//     public void onCreate() {
//         super.onCreate();
// 
//         if (BuildConfig.DEBUG) {
//             Timber.plant(new Timber.DebugTree());
//         }
// 
//         component = buildComponent();
//     }
// 
//     protected ApplicationComponent buildComponent() {
//         Timber.d("Building actual component");
//         return DaggerApplicationComponent.builder()
//                 .applicationModule(new ApplicationModule(this)).build();
//     }
// }
// 
// Path: sample/src/main/java/com/metova/privvy/sample/di/HostComponent.java
// @HostScope
// @Subcomponent(modules = {HostModule.class, YokeModule.class})
// public interface HostComponent {
// 
//     PrivvyComponent newPrivvyComponent();
// 
//     @Subcomponent.Builder
//     interface Builder {
// 
//         HostComponent.Builder hostModule(HostModule module);
// 
//         HostComponent build();
//     }
// }
// 
// Path: sample/src/main/java/com/metova/privvy/sample/di/HostModule.java
// @Module
// public class HostModule {
// 
//     private final PrivvyHost host;
// 
//     public HostModule(PrivvyHost host) {
//         this.host = host;
//     }
// 
//     @Provides
//     @HostScope
//     PrivvyHost provideHost() {
//         return host;
//     }
// }


// Path: sample/src/main/java/com/metova/privvy/sample/ui/list/ListActivity.java
import com.metova.privvy.PrivvyHost;
import com.metova.privvy.PrivvyHostDelegate;
import com.metova.privvy.RouteData;
import com.metova.privvy.sample.R;
import com.metova.privvy.sample.SampleApplication;
import com.metova.privvy.sample.di.HostComponent;
import com.metova.privvy.sample.di.HostModule;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import java.util.List;
import javax.inject.Inject;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

package com.metova.privvy.sample.ui.list;






public class ListActivity extends AppCompatActivity implements PrivvyHost, ListContract.View, ListAdapter.ListClickCallback {

    @Inject
    ListComponent listComponent;

    PrivvyHostDelegate hostDelegate;

    @BindView(R.id.list_recyclerview)
    RecyclerView numberList;

    private ListContract.Presenter presenter;

    private ListAdapter listAdapter = new ListAdapter(this);

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        HostComponent hostComponent = SampleApplication.component.newHost()
                .hostModule(new HostModule(this))