// Path: example/src/main/java/eu/darken/ommvplib/example/screens/MainActivity.java
// public class MainActivity extends AppCompatActivity implements MainPresenter.View, HasManualSupportFragmentInjector {
// 
//     @Inject ComponentSource<Fragment> componentSource;
// 
//     @BindView(R.id.container) ViewGroup container;
//     @BindView(R.id.bindcounter) TextView bindCounter;
// 
//     private InstanceStatePublisher statePublisher;
// 
//     @Override
//     public ManualInjector<Fragment> supportFragmentInjector() {
//         return componentSource;
//     }
// 
//     @Override
//     protected void onCreate(Bundle savedInstanceState) {
//         super.onCreate(savedInstanceState);
//         statePublisher = new InstanceStatePublisher();
//         statePublisher.onCreate(savedInstanceState);
//         OMMVPLib.<MainPresenter.View, MainPresenter>builder()
//                 .statePublisher(statePublisher)
//                 .presenterCallback(new PresenterInjectionCallback<>(this))
//                 .presenterSource(new InjectedPresenter<>(this))
//                 .attach(this);
//         setContentView(R.layout.activity_main);
//         ButterKnife.bind(this);
//     }
// 
//     @Override
//     protected void onSaveInstanceState(Bundle outState) {
//         statePublisher.onSaveInstanceState(outState);
//         super.onSaveInstanceState(outState);
//     }
// 
//     @Override
//     public void showFragment(Class<? extends Fragment> fragmentClass) {
//         Fragment fragment = getSupportFragmentManager().findFragmentById(R.id.container);
//         if (fragment == null) {
//             fragment = Fragment.instantiate(this, fragmentClass.getName());
//             getSupportFragmentManager().beginTransaction().add(R.id.container, fragment).commitNow();
//         }
//     }
// 
//     @Override
//     public void showBinderCounter(int count) {
//         bindCounter.setText(String.format(Locale.US, "Activity Rotation Count: %d", count));
//     }
// }
// 
// Path: example/src/main/java/eu/darken/ommvplib/example/screens/MainComponent.java
// @MainComponent.Scope
// @Subcomponent(modules = {
//         FragmentBinderModule.class,
//         AndroidSupportInjectionModule.class,
//         MainModule.class
// })
// public interface MainComponent extends ActivityComponent<MainActivity>, PresenterComponent<MainPresenter.View, MainPresenter> {
// 
//     @Subcomponent.Builder
//     abstract class Builder extends ActivityComponent.Builder<MainActivity, MainComponent> {}
// 
//     @javax.inject.Scope
//     @Retention(RetentionPolicy.RUNTIME)
//     @interface Scope {}
// }


import dagger.Binds;
import dagger.Module;
import dagger.android.ActivityKey;
import dagger.android.AndroidInjector;
import dagger.multibindings.IntoMap;
import eu.darken.ommvplib.example.screens.MainActivity;
import eu.darken.ommvplib.example.screens.MainComponent;
package eu.darken.ommvplib.example;


@Module(subcomponents = {MainComponent.class})
abstract class ActivityBinderModule {

// Path: example/src/main/java/eu/darken/ommvplib/example/screens/MainActivity.java
// public class MainActivity extends AppCompatActivity implements MainPresenter.View, HasManualSupportFragmentInjector {
// 
//     @Inject ComponentSource<Fragment> componentSource;
// 
//     @BindView(R.id.container) ViewGroup container;
//     @BindView(R.id.bindcounter) TextView bindCounter;
// 
//     private InstanceStatePublisher statePublisher;
// 
//     @Override
//     public ManualInjector<Fragment> supportFragmentInjector() {
//         return componentSource;
//     }
// 
//     @Override
//     protected void onCreate(Bundle savedInstanceState) {
//         super.onCreate(savedInstanceState);
//         statePublisher = new InstanceStatePublisher();
//         statePublisher.onCreate(savedInstanceState);
//         OMMVPLib.<MainPresenter.View, MainPresenter>builder()
//                 .statePublisher(statePublisher)
//                 .presenterCallback(new PresenterInjectionCallback<>(this))
//                 .presenterSource(new InjectedPresenter<>(this))
//                 .attach(this);
//         setContentView(R.layout.activity_main);
//         ButterKnife.bind(this);
//     }
// 
//     @Override
//     protected void onSaveInstanceState(Bundle outState) {
//         statePublisher.onSaveInstanceState(outState);
//         super.onSaveInstanceState(outState);
//     }
// 
//     @Override
//     public void showFragment(Class<? extends Fragment> fragmentClass) {
//         Fragment fragment = getSupportFragmentManager().findFragmentById(R.id.container);
//         if (fragment == null) {
//             fragment = Fragment.instantiate(this, fragmentClass.getName());
//             getSupportFragmentManager().beginTransaction().add(R.id.container, fragment).commitNow();
//         }
//     }
// 
//     @Override
//     public void showBinderCounter(int count) {
//         bindCounter.setText(String.format(Locale.US, "Activity Rotation Count: %d", count));
//     }
// }
// 
// Path: example/src/main/java/eu/darken/ommvplib/example/screens/MainComponent.java
// @MainComponent.Scope
// @Subcomponent(modules = {
//         FragmentBinderModule.class,
//         AndroidSupportInjectionModule.class,
//         MainModule.class
// })
// public interface MainComponent extends ActivityComponent<MainActivity>, PresenterComponent<MainPresenter.View, MainPresenter> {
// 
//     @Subcomponent.Builder
//     abstract class Builder extends ActivityComponent.Builder<MainActivity, MainComponent> {}
// 
//     @javax.inject.Scope
//     @Retention(RetentionPolicy.RUNTIME)
//     @interface Scope {}
// }


// Path: example/src/main/java/eu/darken/ommvplib/example/ActivityBinderModule.java
import dagger.Binds;
import dagger.Module;
import dagger.android.ActivityKey;
import dagger.android.AndroidInjector;
import dagger.multibindings.IntoMap;
import eu.darken.ommvplib.example.screens.MainActivity;
import eu.darken.ommvplib.example.screens.MainComponent;

package eu.darken.ommvplib.example;


@Module(subcomponents = {MainComponent.class})
abstract class ActivityBinderModule {

    @Binds