// Path: app/src/main/java/com/shaunchurch/androidpickings/AppComponent.java
// @ApplicationScope
// @Component(modules = { AppModule.class, UiModule.class, DataModule.class })
// public interface AppComponent extends AppGraph {
//     /**
//      * An initializer that creates the graph from an application.
//      */
//     final static class Initializer {
//         static AppComponent init(App app) {
//             return DaggerAppComponent.builder()
//                     .appModule(new AppModule(app))
//                     .build();
//         }
//         private Initializer() {} // No instances.
//     }
// 
//     Application provideApplication();
// }
// 
// Path: app/src/main/java/com/shaunchurch/androidpickings/data/entities/Planet.java
// public class Planet {
// 
//     private String name;
//     private String type;
// 
//     public Planet(String name, String type) {
//         this.name = name;
//         this.type = type;
//     }
// 
//     public String getName() {
//         return name;
//     }
// 
//     public String getType() {
//         return type;
//     }
// }
// 
// Path: app/src/main/java/com/shaunchurch/androidpickings/ui/base/BaseActivity.java
// public abstract class BaseActivity extends ActionBarActivity {
// 
//     @Inject
//     AppContainer appContainer;
// 
//     @Override
//     protected void onCreate(Bundle savedInstanceState) {
//         super.onCreate(savedInstanceState);
// 
//         App app = App.get(this);
//         onCreateComponent(app.component());
// 
//         if(appContainer == null ){
//             throw new IllegalStateException("No injection happened. Add component.inject(this) in onCreateComponent.");
//         }
//     }
// 
//     /**
//      * Must be implemented by derived activities.
//      * Otherwise IllegalStateException will be thrown.
//      * Derived activity is responsible to store and save it's component.
//      */
//     protected abstract void onCreateComponent(AppComponent appComponent);
// 
// }


import android.os.Bundle;
import android.widget.ListView;
import com.shaunchurch.androidpickings.AppComponent;
import com.shaunchurch.androidpickings.R;
import com.shaunchurch.androidpickings.data.entities.Planet;
import com.shaunchurch.androidpickings.ui.base.BaseActivity;
import java.util.List;
import javax.inject.Inject;
import butterknife.ButterKnife;
import butterknife.InjectView;
package com.shaunchurch.androidpickings.ui.planets;






public class PlanetsActivity extends BaseActivity
    implements PlanetView {

    private PlanetsComponent planetsComponent;

    @Inject PlanetPresenter presenter;
    @Inject PlanetAdapter planetAdapter;

    @InjectView(R.id.listPlanets) ListView listPlanets;

    @Override
    protected void onCreateComponent(AppComponent appComponent) {
        planetsComponent = DaggerPlanetsComponent.builder()
                .appComponent(appComponent)
                .planetsModule(new PlanetsModule(this))
                .build();
        planetsComponent.inject(this);
    }

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_planets);
        ButterKnife.inject(this);

        // set list adapter
        listPlanets.setAdapter(planetAdapter);
    }

    @Override
// Path: app/src/main/java/com/shaunchurch/androidpickings/AppComponent.java
// @ApplicationScope
// @Component(modules = { AppModule.class, UiModule.class, DataModule.class })
// public interface AppComponent extends AppGraph {
//     /**
//      * An initializer that creates the graph from an application.
//      */
//     final static class Initializer {
//         static AppComponent init(App app) {
//             return DaggerAppComponent.builder()
//                     .appModule(new AppModule(app))
//                     .build();
//         }
//         private Initializer() {} // No instances.
//     }
// 
//     Application provideApplication();
// }
// 
// Path: app/src/main/java/com/shaunchurch/androidpickings/data/entities/Planet.java
// public class Planet {
// 
//     private String name;
//     private String type;
// 
//     public Planet(String name, String type) {
//         this.name = name;
//         this.type = type;
//     }
// 
//     public String getName() {
//         return name;
//     }
// 
//     public String getType() {
//         return type;
//     }
// }
// 
// Path: app/src/main/java/com/shaunchurch/androidpickings/ui/base/BaseActivity.java
// public abstract class BaseActivity extends ActionBarActivity {
// 
//     @Inject
//     AppContainer appContainer;
// 
//     @Override
//     protected void onCreate(Bundle savedInstanceState) {
//         super.onCreate(savedInstanceState);
// 
//         App app = App.get(this);
//         onCreateComponent(app.component());
// 
//         if(appContainer == null ){
//             throw new IllegalStateException("No injection happened. Add component.inject(this) in onCreateComponent.");
//         }
//     }
// 
//     /**
//      * Must be implemented by derived activities.
//      * Otherwise IllegalStateException will be thrown.
//      * Derived activity is responsible to store and save it's component.
//      */
//     protected abstract void onCreateComponent(AppComponent appComponent);
// 
// }


// Path: app/src/main/java/com/shaunchurch/androidpickings/ui/planets/PlanetsActivity.java
import android.os.Bundle;
import android.widget.ListView;
import com.shaunchurch.androidpickings.AppComponent;
import com.shaunchurch.androidpickings.R;
import com.shaunchurch.androidpickings.data.entities.Planet;
import com.shaunchurch.androidpickings.ui.base.BaseActivity;
import java.util.List;
import javax.inject.Inject;
import butterknife.ButterKnife;
import butterknife.InjectView;

package com.shaunchurch.androidpickings.ui.planets;






public class PlanetsActivity extends BaseActivity
    implements PlanetView {

    private PlanetsComponent planetsComponent;

    @Inject PlanetPresenter presenter;
    @Inject PlanetAdapter planetAdapter;

    @InjectView(R.id.listPlanets) ListView listPlanets;

    @Override
    protected void onCreateComponent(AppComponent appComponent) {
        planetsComponent = DaggerPlanetsComponent.builder()
                .appComponent(appComponent)
                .planetsModule(new PlanetsModule(this))
                .build();
        planetsComponent.inject(this);
    }

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_planets);
        ButterKnife.inject(this);

        // set list adapter
        listPlanets.setAdapter(planetAdapter);
    }

    @Override
    public void onPlanetsReceived(List<Planet> planets) {