android/tutorials/tutorial2/src/main/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeBuilder.java [33:112]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
public class TicTacToeBuilder
    extends ViewBuilder<TicTacToeView, TicTacToeRouter, TicTacToeBuilder.ParentComponent> {

  public TicTacToeBuilder(ParentComponent dependency) {
    super(dependency);
  }

  /**
   * Builds a new {@link TicTacToeRouter}.
   *
   * @param parentViewGroup parent view group that this router's view will be added to.
   * @return a new {@link TicTacToeRouter}.
   */
  public TicTacToeRouter build(ViewGroup parentViewGroup) {
    TicTacToeView view = createView(parentViewGroup);
    TicTacToeInteractor interactor = new TicTacToeInteractor();
    Component component =
        DaggerTicTacToeBuilder_Component.builder()
            .parentComponent(getDependency())
            .view(view)
            .interactor(interactor)
            .build();
    return component.tictactoeRouter();
  }

  @Override
  protected TicTacToeView inflateView(LayoutInflater inflater, ViewGroup parentViewGroup) {
    return (TicTacToeView) inflater.inflate(R.layout.tic_tac_toe_rib, parentViewGroup, false);
  }

  public interface ParentComponent {
    // TODO: Define dependencies required from your parent interactor here.
  }

  @dagger.Module
  public abstract static class Module {

    @TicTacToeScope
    @Binds
    abstract TicTacToeInteractor.TicTacToePresenter presenter(TicTacToeView view);

    @TicTacToeScope
    @Provides
    static TicTacToeRouter router(
        Component component, TicTacToeView view, TicTacToeInteractor interactor) {
      return new TicTacToeRouter(view, interactor, component);
    }
  }

  @TicTacToeScope
  @dagger.Component(modules = Module.class, dependencies = ParentComponent.class)
  interface Component extends InteractorBaseComponent<TicTacToeInteractor>, BuilderComponent {

    @dagger.Component.Builder
    interface Builder {

      @BindsInstance
      Builder interactor(TicTacToeInteractor interactor);

      @BindsInstance
      Builder view(TicTacToeView view);

      Builder parentComponent(ParentComponent component);

      Component build();
    }
  }

  interface BuilderComponent {

    TicTacToeRouter tictactoeRouter();
  }

  @Scope
  @Retention(CLASS)
  @interface TicTacToeScope {}

  @Qualifier
  @Retention(CLASS)
  @interface TicTacToeInternal {}
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



android/tutorials/tutorial3/src/main/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeBuilder.java [33:112]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
public class TicTacToeBuilder
    extends ViewBuilder<TicTacToeView, TicTacToeRouter, TicTacToeBuilder.ParentComponent> {

  public TicTacToeBuilder(ParentComponent dependency) {
    super(dependency);
  }

  /**
   * Builds a new {@link TicTacToeRouter}.
   *
   * @param parentViewGroup parent view group that this router's view will be added to.
   * @return a new {@link TicTacToeRouter}.
   */
  public TicTacToeRouter build(ViewGroup parentViewGroup) {
    TicTacToeView view = createView(parentViewGroup);
    TicTacToeInteractor interactor = new TicTacToeInteractor();
    Component component =
        DaggerTicTacToeBuilder_Component.builder()
            .parentComponent(getDependency())
            .view(view)
            .interactor(interactor)
            .build();
    return component.tictactoeRouter();
  }

  @Override
  protected TicTacToeView inflateView(LayoutInflater inflater, ViewGroup parentViewGroup) {
    return (TicTacToeView) inflater.inflate(R.layout.tic_tac_toe_rib, parentViewGroup, false);
  }

  public interface ParentComponent {
    // TODO: Define dependencies required from your parent interactor here.
  }

  @dagger.Module
  public abstract static class Module {

    @TicTacToeScope
    @Binds
    abstract TicTacToeInteractor.TicTacToePresenter presenter(TicTacToeView view);

    @TicTacToeScope
    @Provides
    static TicTacToeRouter router(
        Component component, TicTacToeView view, TicTacToeInteractor interactor) {
      return new TicTacToeRouter(view, interactor, component);
    }
  }

  @TicTacToeScope
  @dagger.Component(modules = Module.class, dependencies = ParentComponent.class)
  interface Component extends InteractorBaseComponent<TicTacToeInteractor>, BuilderComponent {

    @dagger.Component.Builder
    interface Builder {

      @BindsInstance
      Builder interactor(TicTacToeInteractor interactor);

      @BindsInstance
      Builder view(TicTacToeView view);

      Builder parentComponent(ParentComponent component);

      Component build();
    }
  }

  interface BuilderComponent {

    TicTacToeRouter tictactoeRouter();
  }

  @Scope
  @Retention(CLASS)
  @interface TicTacToeScope {}

  @Qualifier
  @Retention(CLASS)
  @interface TicTacToeInternal {}
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



