// Path: flowr/src/main/java/com/fueled/flowr/internal/FlowrDeepLinkHandler.java
// public interface FlowrDeepLinkHandler {
// 
//     /**
//      * Retrieve deep link info from an intent.
//      *
//      * @param intent the intent to retrieve the info from.
//      * @return the deep link info if found for the specified intent, else null.
//      */
//     @Nullable
//     FlowrDeepLinkInfo getDeepLinkInfoForIntent(@NonNull Intent intent);
// }
// 
// Path: flowr/src/main/java/com/fueled/flowr/internal/FlowrDeepLinkInfo.java
// public class FlowrDeepLinkInfo<T extends Fragment & FlowrFragment> {
//     public final Bundle data;
//     public final Class<? extends T> fragment;
// 
//     public FlowrDeepLinkInfo(Bundle data, Class<? extends T> fragment) {
//         this.data = data;
//         this.fragment = fragment;
//     }
// }
// 
// Path: flowr/src/main/java/com/fueled/flowr/internal/TransactionData.java
// public final class TransactionData<T extends Fragment & FlowrFragment> {
// 
//     private Class<? extends T> fragmentClass;
//     private Bundle args;
//     private boolean skipBackStack = false;
//     private boolean clearBackStack = false;
//     private boolean replaceCurrentFragment = false;
//     private int enterAnim;
//     private int exitAnim;
//     private int popEnterAnim;
//     private int popExitAnim;
//     private Intent deepLinkIntent;
// 
//     public TransactionData(Class<? extends T> fragmentClass) {
//         this(fragmentClass, FragmentTransaction.TRANSIT_NONE, FragmentTransaction.TRANSIT_NONE);
//     }
// 
//     public TransactionData(Class<? extends T> fragmentClass, int enterAnim, int exitAnim) {
//         this(fragmentClass, enterAnim, exitAnim, FragmentTransaction.TRANSIT_NONE,
//                 FragmentTransaction.TRANSIT_NONE);
//     }
// 
//     public TransactionData(Class<? extends T> fragmentClass, int enterAnim, int exitAnim,
//                            int popEnterAnim, int popExitAnim) {
//         this.fragmentClass = fragmentClass;
//         this.enterAnim = enterAnim;
//         this.exitAnim = exitAnim;
//         this.popEnterAnim = popEnterAnim;
//         this.popExitAnim = popExitAnim;
//     }
// 
//     public Intent getDeepLinkIntent() {
//         return deepLinkIntent;
//     }
// 
//     public void setDeepLinkIntent(Intent deepLinkIntent) {
//         this.deepLinkIntent = deepLinkIntent;
//     }
// 
//     public int getPopEnterAnim() {
//         return popEnterAnim;
//     }
// 
//     public void setPopEnterAnim(int popEnterAnim) {
//         this.popEnterAnim = popEnterAnim;
//     }
// 
//     public int getPopExitAnim() {
//         return popExitAnim;
//     }
// 
//     public void setPopExitAnim(int popExitAnim) {
//         this.popExitAnim = popExitAnim;
//     }
// 
//     public Class<? extends T> getFragmentClass() {
//         return fragmentClass;
//     }
// 
//     public void setFragmentClass(Class<? extends T> fragmentClass) {
//         this.fragmentClass = fragmentClass;
//     }
// 
//     public Bundle getArgs() {
//         return args;
//     }
// 
//     public void setArgs(Bundle args) {
//         this.args = args;
//     }
// 
//     public boolean isSkipBackStack() {
//         return skipBackStack;
//     }
// 
//     public void setSkipBackStack(boolean skipBackStack) {
//         this.skipBackStack = skipBackStack;
//     }
// 
//     public boolean isClearBackStack() {
//         return clearBackStack;
//     }
// 
//     public void setClearBackStack(boolean clearBackStack) {
//         this.clearBackStack = clearBackStack;
//     }
// 
//     public boolean isReplaceCurrentFragment() {
//         return replaceCurrentFragment;
//     }
// 
//     public void setReplaceCurrentFragment(boolean replaceCurrentFragment) {
//         this.replaceCurrentFragment = replaceCurrentFragment;
//     }
// 
//     public int getEnterAnim() {
//         return enterAnim;
//     }
// 
//     public void setEnterAnim(int enterAnim) {
//         this.enterAnim = enterAnim;
//     }
// 
//     public int getExitAnim() {
//         return exitAnim;
//     }
// 
//     public void setExitAnim(int exitAnim) {
//         this.exitAnim = exitAnim;
//     }
// }


import android.content.Intent;
import android.content.pm.ActivityInfo;
import android.net.Uri;
import android.os.Bundle;
import android.support.annotation.AnimRes;
import android.support.annotation.IdRes;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;
import android.text.TextUtils;
import android.util.Log;
import android.view.View;
import com.fueled.flowr.internal.FlowrDeepLinkHandler;
import com.fueled.flowr.internal.FlowrDeepLinkInfo;
import com.fueled.flowr.internal.TransactionData;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

            if (data.isReplaceCurrentFragment()) {
                transaction.replace(mainContainerId, fragment);
            } else {
                transaction.add(mainContainerId, fragment);
            }

            identifier = transaction.commit();

            if (data.isSkipBackStack()) {
                setCurrentFragment(fragment);
            }
        } catch (Exception e) {
            Log.e(TAG, "Error while displaying fragment.", e);
        }
        return identifier;
    }

    /**
     * Parse the intent set by {@link TransactionData#deepLinkIntent} and if this intent contains
     * Deep Link info, update the {@link #currentFragment} and the Transaction data.
     *
     * @param data The Transaction data to extend if Deep link info are found in
     *             the {@link TransactionData#deepLinkIntent}.
     * @param <T>  The generic type for a valid Fragment.
     */
    @SuppressWarnings("unchecked")
    private <T extends Fragment & FlowrFragment> void injectDeepLinkInfo(TransactionData<T> data) {
        Intent deepLinkIntent = data.getDeepLinkIntent();
        if (deepLinkIntent != null) {
// Path: flowr/src/main/java/com/fueled/flowr/internal/FlowrDeepLinkHandler.java
// public interface FlowrDeepLinkHandler {
// 
//     /**
//      * Retrieve deep link info from an intent.
//      *
//      * @param intent the intent to retrieve the info from.
//      * @return the deep link info if found for the specified intent, else null.
//      */
//     @Nullable
//     FlowrDeepLinkInfo getDeepLinkInfoForIntent(@NonNull Intent intent);
// }
// 
// Path: flowr/src/main/java/com/fueled/flowr/internal/FlowrDeepLinkInfo.java
// public class FlowrDeepLinkInfo<T extends Fragment & FlowrFragment> {
//     public final Bundle data;
//     public final Class<? extends T> fragment;
// 
//     public FlowrDeepLinkInfo(Bundle data, Class<? extends T> fragment) {
//         this.data = data;
//         this.fragment = fragment;
//     }
// }
// 
// Path: flowr/src/main/java/com/fueled/flowr/internal/TransactionData.java
// public final class TransactionData<T extends Fragment & FlowrFragment> {
// 
//     private Class<? extends T> fragmentClass;
//     private Bundle args;
//     private boolean skipBackStack = false;
//     private boolean clearBackStack = false;
//     private boolean replaceCurrentFragment = false;
//     private int enterAnim;
//     private int exitAnim;
//     private int popEnterAnim;
//     private int popExitAnim;
//     private Intent deepLinkIntent;
// 
//     public TransactionData(Class<? extends T> fragmentClass) {
//         this(fragmentClass, FragmentTransaction.TRANSIT_NONE, FragmentTransaction.TRANSIT_NONE);
//     }
// 
//     public TransactionData(Class<? extends T> fragmentClass, int enterAnim, int exitAnim) {
//         this(fragmentClass, enterAnim, exitAnim, FragmentTransaction.TRANSIT_NONE,
//                 FragmentTransaction.TRANSIT_NONE);
//     }
// 
//     public TransactionData(Class<? extends T> fragmentClass, int enterAnim, int exitAnim,
//                            int popEnterAnim, int popExitAnim) {
//         this.fragmentClass = fragmentClass;
//         this.enterAnim = enterAnim;
//         this.exitAnim = exitAnim;
//         this.popEnterAnim = popEnterAnim;
//         this.popExitAnim = popExitAnim;
//     }
// 
//     public Intent getDeepLinkIntent() {
//         return deepLinkIntent;
//     }
// 
//     public void setDeepLinkIntent(Intent deepLinkIntent) {
//         this.deepLinkIntent = deepLinkIntent;
//     }
// 
//     public int getPopEnterAnim() {
//         return popEnterAnim;
//     }
// 
//     public void setPopEnterAnim(int popEnterAnim) {
//         this.popEnterAnim = popEnterAnim;
//     }
// 
//     public int getPopExitAnim() {
//         return popExitAnim;
//     }
// 
//     public void setPopExitAnim(int popExitAnim) {
//         this.popExitAnim = popExitAnim;
//     }
// 
//     public Class<? extends T> getFragmentClass() {
//         return fragmentClass;
//     }
// 
//     public void setFragmentClass(Class<? extends T> fragmentClass) {
//         this.fragmentClass = fragmentClass;
//     }
// 
//     public Bundle getArgs() {
//         return args;
//     }
// 
//     public void setArgs(Bundle args) {
//         this.args = args;
//     }
// 
//     public boolean isSkipBackStack() {
//         return skipBackStack;
//     }
// 
//     public void setSkipBackStack(boolean skipBackStack) {
//         this.skipBackStack = skipBackStack;
//     }
// 
//     public boolean isClearBackStack() {
//         return clearBackStack;
//     }
// 
//     public void setClearBackStack(boolean clearBackStack) {
//         this.clearBackStack = clearBackStack;
//     }
// 
//     public boolean isReplaceCurrentFragment() {
//         return replaceCurrentFragment;
//     }
// 
//     public void setReplaceCurrentFragment(boolean replaceCurrentFragment) {
//         this.replaceCurrentFragment = replaceCurrentFragment;
//     }
// 
//     public int getEnterAnim() {
//         return enterAnim;
//     }
// 
//     public void setEnterAnim(int enterAnim) {
//         this.enterAnim = enterAnim;
//     }
// 
//     public int getExitAnim() {
//         return exitAnim;
//     }
// 
//     public void setExitAnim(int exitAnim) {
//         this.exitAnim = exitAnim;
//     }
// }


// Path: flowr/src/main/java/com/fueled/flowr/Flowr.java
import android.content.Intent;
import android.content.pm.ActivityInfo;
import android.net.Uri;
import android.os.Bundle;
import android.support.annotation.AnimRes;
import android.support.annotation.IdRes;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;
import android.text.TextUtils;
import android.util.Log;
import android.view.View;
import com.fueled.flowr.internal.FlowrDeepLinkHandler;
import com.fueled.flowr.internal.FlowrDeepLinkInfo;
import com.fueled.flowr.internal.TransactionData;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;


            if (data.isReplaceCurrentFragment()) {
                transaction.replace(mainContainerId, fragment);
            } else {
                transaction.add(mainContainerId, fragment);
            }

            identifier = transaction.commit();

            if (data.isSkipBackStack()) {
                setCurrentFragment(fragment);
            }
        } catch (Exception e) {
            Log.e(TAG, "Error while displaying fragment.", e);
        }
        return identifier;
    }

    /**
     * Parse the intent set by {@link TransactionData#deepLinkIntent} and if this intent contains
     * Deep Link info, update the {@link #currentFragment} and the Transaction data.
     *
     * @param data The Transaction data to extend if Deep link info are found in
     *             the {@link TransactionData#deepLinkIntent}.
     * @param <T>  The generic type for a valid Fragment.
     */
    @SuppressWarnings("unchecked")
    private <T extends Fragment & FlowrFragment> void injectDeepLinkInfo(TransactionData<T> data) {
        Intent deepLinkIntent = data.getDeepLinkIntent();
        if (deepLinkIntent != null) {
            for (FlowrDeepLinkHandler handler : deepLinkHandlers) {