@PerSection
@Component( dependencies = MainActivityComponent.class, modules = TestSectionModule.class)
public interface SectionComponentMain extends
    FirstFragment.Pluser,
    SecondFragment.Pluser{
} public abstract class BaseFragment<T> extends Fragment {

  protected T fragmentComponent;

  @Override public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    initDIComponent();
    setRetainInstance(true);
  }

  public T getFragmentComponent() {
    return fragmentComponent;
  }

  protected abstract void initDIComponent();

  /**
   * Gets a component for dependency injection by its type.
   */
  protected <C> C getParentComponent(Class<C> componentType) {
    return componentType.cast(((BaseInjectionActivity) getActivity()).getActivityComponent());
  }

} @Module
public class FragmentModule {
  BaseFragment baseFragment;

  public FragmentModule(BaseFragment baseFragment) {
    this.baseFragment = baseFragment;
  }
} public class FirstFragmentPresenter {

  private final FirstFragmentView firstFragmentView;
  private final D d;

  public FirstFragmentPresenter(FirstFragmentView firstFragmentView, D d) {
    this.firstFragmentView = firstFragmentView;
    this.d = d;
  }

  public D getD(){
    return d;
  }
} public interface FirstFragmentView{

} public class A {} public class D {

  @Inject
  public D() {

  }

} public class E {

} public class NotScopedProperty {

} public class SectionProperty {

}
import android.os.Bundle;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import java.util.List;
import javax.inject.Inject;
import me.martinez.sergio.daggertwobasearchitecture.R;
import me.martinez.sergio.daggertwobasearchitecture.di.anotations.scopes.PerSection;
import me.martinez.sergio.daggertwobasearchitecture.di.components.SectionComponentMain;
import me.martinez.sergio.daggertwobasearchitecture.di.injectableelements.base.BaseFragment;
import me.martinez.sergio.daggertwobasearchitecture.di.modules.FragmentModule;
import me.martinez.sergio.daggertwobasearchitecture.fragments.sections.testsection.firststep.presentation.FirstFragmentPresenter;
import me.martinez.sergio.daggertwobasearchitecture.fragments.sections.testsection.firststep.presentation.FirstFragmentView;
import me.martinez.sergio.daggertwobasearchitecture.test.A;
import me.martinez.sergio.daggertwobasearchitecture.test.D;
import me.martinez.sergio.daggertwobasearchitecture.test.E;
import me.martinez.sergio.daggertwobasearchitecture.test.NotScopedProperty;
import me.martinez.sergio.daggertwobasearchitecture.test.SectionProperty;
/*
 *  Copyright (C) 2015 Sergio Martinez Open Source Project
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *  http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */

package me.martinez.sergio.daggertwobasearchitecture.fragments.sections.testsection.firststep;


/**
 * Created by Sergio Martinez Rodriguez
 * Date 15/7/15.
 */
public class FirstFragment extends BaseFragment<FirstFragmentComponent> implements
    FirstFragmentView {

  @Inject A a;
  @Inject E e;
  @Inject D d;
  @Inject List<String> diInjectionHistory;
  @Inject FirstFragmentPresenter firstFragmentPresenter;
  @Inject SectionProperty sectionProperty;
  @Inject NotScopedProperty notScopedProperty;