// Path: sample/src/main/java/com/example/flow/mortar/DaggerService.java
// public class DaggerService {
// 
//     public static final String SERVICE_NAME = DaggerService.class.getName();
// 
//     /**
//      * Caller is required to know the type of the component for this context.
//      */
//     @SuppressWarnings("unchecked") //
//     public static <T> T getDaggerComponent(Context context) {
//         return (T) context.getSystemService(SERVICE_NAME);
//     }
// }
// 
// Path: sample/src/main/java/com/example/flow/ui/screen/ViewPostScreen.java
// @Layout(R.layout.screen_view_post)
// public class ViewPostScreen extends Path implements ComponentFactory<RootActivity.Component> {
// 
//     private Post post;
// 
//     public ViewPostScreen(Post post) {
//         this.post = post;
//     }
// 
//     @Override
//     public Object createComponent(RootActivity.Component component) {
//         return DaggerViewPostScreen_Component.builder()
//                 .component(component)
//                 .module(new Module())
//                 .build();
//     }
// 
//     @dagger.Component(dependencies = RootActivity.Component.class, modules = Module.class)
//     @ScreenScope(Component.class)
//     public interface Component extends RootActivity.Component {
// 
//         void inject(ViewPostView view);
//     }
// 
//     public static class Presenter extends ViewPresenter<ViewPostView> {
// 
//         private final Post post;
// 
//         @Inject
//         public Presenter(Post post) {
//             this.post = post;
//         }
// 
//         @Override
//         protected void onLoad(Bundle savedInstanceState) {
//             getView().titleTextView.setText(post.getTitle());
//             getView().contentTextView.setText(post.getBody());
//         }
// 
//     }
// 
//     @dagger.Module
//     public class Module {
// 
//         @Provides
//         @ScreenScope(Component.class)
//         public Presenter providePresenter() {
//             return new Presenter(post);
//         }
//     }
// }


import android.content.Context;
import android.util.AttributeSet;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.example.flow.R;
import com.example.flow.mortar.DaggerService;
import com.example.flow.ui.screen.ViewPostScreen;
import javax.inject.Inject;
import butterknife.ButterKnife;
import butterknife.InjectView;
package com.example.flow.ui.view;





/**
 * @author Lukasz Piliszczuk <lukasz.pili@gmail.com>
 */
public class ViewPostView extends LinearLayout {

    @InjectView(R.id.title)
    public TextView titleTextView;

    @InjectView(R.id.content)
    public TextView contentTextView;

    @Inject
// Path: sample/src/main/java/com/example/flow/mortar/DaggerService.java
// public class DaggerService {
// 
//     public static final String SERVICE_NAME = DaggerService.class.getName();
// 
//     /**
//      * Caller is required to know the type of the component for this context.
//      */
//     @SuppressWarnings("unchecked") //
//     public static <T> T getDaggerComponent(Context context) {
//         return (T) context.getSystemService(SERVICE_NAME);
//     }
// }
// 
// Path: sample/src/main/java/com/example/flow/ui/screen/ViewPostScreen.java
// @Layout(R.layout.screen_view_post)
// public class ViewPostScreen extends Path implements ComponentFactory<RootActivity.Component> {
// 
//     private Post post;
// 
//     public ViewPostScreen(Post post) {
//         this.post = post;
//     }
// 
//     @Override
//     public Object createComponent(RootActivity.Component component) {
//         return DaggerViewPostScreen_Component.builder()
//                 .component(component)
//                 .module(new Module())
//                 .build();
//     }
// 
//     @dagger.Component(dependencies = RootActivity.Component.class, modules = Module.class)
//     @ScreenScope(Component.class)
//     public interface Component extends RootActivity.Component {
// 
//         void inject(ViewPostView view);
//     }
// 
//     public static class Presenter extends ViewPresenter<ViewPostView> {
// 
//         private final Post post;
// 
//         @Inject
//         public Presenter(Post post) {
//             this.post = post;
//         }
// 
//         @Override
//         protected void onLoad(Bundle savedInstanceState) {
//             getView().titleTextView.setText(post.getTitle());
//             getView().contentTextView.setText(post.getBody());
//         }
// 
//     }
// 
//     @dagger.Module
//     public class Module {
// 
//         @Provides
//         @ScreenScope(Component.class)
//         public Presenter providePresenter() {
//             return new Presenter(post);
//         }
//     }
// }


// Path: sample/src/main/java/com/example/flow/ui/view/ViewPostView.java
import android.content.Context;
import android.util.AttributeSet;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.example.flow.R;
import com.example.flow.mortar.DaggerService;
import com.example.flow.ui.screen.ViewPostScreen;
import javax.inject.Inject;
import butterknife.ButterKnife;
import butterknife.InjectView;

package com.example.flow.ui.view;





/**
 * @author Lukasz Piliszczuk <lukasz.pili@gmail.com>
 */
public class ViewPostView extends LinearLayout {

    @InjectView(R.id.title)
    public TextView titleTextView;

    @InjectView(R.id.content)
    public TextView contentTextView;

    @Inject
    protected ViewPostScreen.Presenter presenter;