package me.yokeyword.fragmentation;


/**
 * Created by YoKeyword on 16/6/2.
 */
interface ISupportFragment extends ISupport {

    /**
     * replace目标Fragment, 主要用于Fragment之间的replace
     *
     * @param toFragment 目标Fragment
     * @param addToBack  是否添加到回退栈
     */
    void replaceFragment(SupportFragment toFragment, boolean addToBack);

    /**
     * @return 位于栈顶的子Fragment
     */
    SupportFragment getTopChildFragment();

    /**
     * @return 当前Fragment的前一个Fragment
     */
    SupportFragment getPreFragment();

    /**
     * @param fragmentClass 目标子Fragment的Class
     * @param <T>           继承自SupportFragment的Fragment
     * @return 目标子Fragment
     */
    <T extends SupportFragment> T findChildFragment(Class<T> fragmentClass);

    <T extends SupportFragment> T findChildFragment(String fragmentTag);

    /**
     * 子栈内 出栈
     */
    void popChild();

    /**
     * 子栈内 出栈到目标Fragment
     *
     * @param targetFragment          目标Fragment的Class
     * @param includeTargetFragment   是否包含目标Fragment
     */
    void popToChild(Class<?> targetFragment, boolean includeTargetFragment);

    void popToChild(String targetFragmentTag, boolean includeTargetFragment);

    /**
     * 子栈内 出栈到目标Fragment,并在出栈后立即进行Fragment事务(可以防止出栈后,直接进行Fragment事务的异常)
     *
     * @param targetFragment               目标Fragment的Class
     * @param includeTargetFragment        是否包含目标Fragment
     * @param afterPopTransactionRunnable  出栈后紧接着的Fragment事务
     */
    void popToChild(Class<?> targetFragment, boolean includeTargetFragment, Runnable afterPopTransactionRunnable);

    void popToChild(String targetFragmentTag, boolean includeTargetFragment, Runnable afterPopTransactionRunnable);
}

@@ -929,32 +929,37 @@
 m targetFragment
+Class
           %E7%9B%AE%E6%A0%87Frag
@@ -961,32 +961,32 @@
 %E6%A0%87Fragment%E7%9A%84Class%0A
-
      * @param in
@@ -1065,32 +1065,37 @@
 %3E targetFragment
+Class
 , boolean includ
@@ -1299,32 +1299,37 @@
 m targetFragment
+Class
                %E7%9B%AE
@@ -1463,32 +1463,32 @@
 gment%E4%BA%8B%E5%8A%A1%0A     */%0A
-
     void popToCh
@@ -1506,32 +1506,37 @@
 %3E targetFragment
+Class
 , boolean includ

Optimize the annotation.