// Path: prettybundle/src/main/java/com/tale/prettybundle/PrettyBundle.java
// public final class PrettyBundle {
//     public static final String INJECTOR_SUFFIX = "$$BundleInjector";
//     public static final String ANDROID_PREFIX = "android.";
//     public static final String JAVA_PREFIX = "java.";
// 
//     private PrettyBundle() {
//         throw new AssertionError("No instances.");
//     }
// 
//     private static final String TAG = "PrettyBundle";
//     private static boolean debug = false;
// 
//     static final Map<Class<?>, Injector<Object>> INJECTORS =
//             new LinkedHashMap<Class<?>, Injector<Object>>();
// 
//     private static final Injector<Object> NOP_INJECTOR = new Injector<Object>() {
//         @Override public void inject(Object target, Bundle extras) {
// 
//         }
//     };
// 
//     /**
//      * Control whether debug logging is enabled.
//      */
//     public static void setDebug(boolean debug) {
//         PrettyBundle.debug = debug;
//     }
// 
//     public static void inject(Activity activity) {
//         if (activity == null) {
//             return;
//         }
// 
//         inject(activity, activity.getIntent().getExtras());
//     }
// 
//     public static void inject(Fragment fragment) {
//         if (fragment == null) {
//             return;
//         }
// 
//         inject(fragment, fragment.getArguments());
//     }
// 
//     public static void inject(android.support.v4.app.Fragment fragment) {
//         if (fragment == null) {
//             return;
//         }
// 
//         inject(fragment, fragment.getArguments());
//     }
// 
//     public static void inject(Service service, Intent intent) {
//         if (service == null) {
//             return;
//         }
// 
//         inject(service, intent == null ? null : intent.getExtras());
//     }
// 
//     private static void inject(Object target, Bundle extras) {
//         Class<?> targetClass = target.getClass();
//         try {
//             if (debug) Log.d(TAG, "Looking up view injector for " + targetClass.getName());
//             Injector<Object> injector = findInjectorForClass(targetClass);
//             if (injector != null) {
//                 injector.inject(target, extras);
//             }
//         } catch (RuntimeException e) {
//             throw e;
//         } catch (Exception e) {
//             throw new RuntimeException("Unable to inject views for " + target, e);
//         }
//     }
// 
//     private static Injector<Object> findInjectorForClass(Class<?> cls)
//             throws IllegalAccessException, InstantiationException {
//         Injector<Object> injector = INJECTORS.get(cls);
//         if (injector != null) {
//             if (debug) Log.d(TAG, "HIT: Cached in injector map.");
//             return injector;
//         }
//         String clsName = cls.getName();
//         if (clsName.startsWith(ANDROID_PREFIX) || clsName.startsWith(JAVA_PREFIX)) {
//             if (debug) Log.d(TAG, "MISS: Reached framework class. Abandoning search.");
//             return NOP_INJECTOR;
//         }
// 
//         try {
//             Class<?> injectorClass = Class.forName(clsName + INJECTOR_SUFFIX);
//             //noinspection unchecked
//             injector = (Injector<Object>) injectorClass.newInstance();
//             if (debug) Log.d(TAG, "HIT: Class loaded injection class.");
//         } catch (ClassNotFoundException e) {
//             if (debug) Log.d(TAG, "Not found. Trying superclass " + cls.getSuperclass().getName());
//             injector = findInjectorForClass(cls.getSuperclass());
//         }
//         INJECTORS.put(cls, injector);
//         return injector;
//     }
// 
// }


import android.app.Fragment;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import com.tale.prettybundle.Extra;
import com.tale.prettybundle.PrettyBundle;
import com.tale.prettybundle.sample.R;
import butterknife.ButterKnife;
import butterknife.InjectView;
package com.tale.prettybundle.sample.fragments;




/**
 * Created by giang on 2/26/15.
 */
public class TestPrimaryExtraFragment extends Fragment {

    @Extra int intVal = 0;
    @Extra long longVal = 0;
    @Extra float floatVal = 0;
    @Extra double doubleVal = 0;
    @Extra boolean booleanVal = false;
    @Extra String stringVal = "Default";
// Path: prettybundle/src/main/java/com/tale/prettybundle/PrettyBundle.java
// public final class PrettyBundle {
//     public static final String INJECTOR_SUFFIX = "$$BundleInjector";
//     public static final String ANDROID_PREFIX = "android.";
//     public static final String JAVA_PREFIX = "java.";
// 
//     private PrettyBundle() {
//         throw new AssertionError("No instances.");
//     }
// 
//     private static final String TAG = "PrettyBundle";
//     private static boolean debug = false;
// 
//     static final Map<Class<?>, Injector<Object>> INJECTORS =
//             new LinkedHashMap<Class<?>, Injector<Object>>();
// 
//     private static final Injector<Object> NOP_INJECTOR = new Injector<Object>() {
//         @Override public void inject(Object target, Bundle extras) {
// 
//         }
//     };
// 
//     /**
//      * Control whether debug logging is enabled.
//      */
//     public static void setDebug(boolean debug) {
//         PrettyBundle.debug = debug;
//     }
// 
//     public static void inject(Activity activity) {
//         if (activity == null) {
//             return;
//         }
// 
//         inject(activity, activity.getIntent().getExtras());
//     }
// 
//     public static void inject(Fragment fragment) {
//         if (fragment == null) {
//             return;
//         }
// 
//         inject(fragment, fragment.getArguments());
//     }
// 
//     public static void inject(android.support.v4.app.Fragment fragment) {
//         if (fragment == null) {
//             return;
//         }
// 
//         inject(fragment, fragment.getArguments());
//     }
// 
//     public static void inject(Service service, Intent intent) {
//         if (service == null) {
//             return;
//         }
// 
//         inject(service, intent == null ? null : intent.getExtras());
//     }
// 
//     private static void inject(Object target, Bundle extras) {
//         Class<?> targetClass = target.getClass();
//         try {
//             if (debug) Log.d(TAG, "Looking up view injector for " + targetClass.getName());
//             Injector<Object> injector = findInjectorForClass(targetClass);
//             if (injector != null) {
//                 injector.inject(target, extras);
//             }
//         } catch (RuntimeException e) {
//             throw e;
//         } catch (Exception e) {
//             throw new RuntimeException("Unable to inject views for " + target, e);
//         }
//     }
// 
//     private static Injector<Object> findInjectorForClass(Class<?> cls)
//             throws IllegalAccessException, InstantiationException {
//         Injector<Object> injector = INJECTORS.get(cls);
//         if (injector != null) {
//             if (debug) Log.d(TAG, "HIT: Cached in injector map.");
//             return injector;
//         }
//         String clsName = cls.getName();
//         if (clsName.startsWith(ANDROID_PREFIX) || clsName.startsWith(JAVA_PREFIX)) {
//             if (debug) Log.d(TAG, "MISS: Reached framework class. Abandoning search.");
//             return NOP_INJECTOR;
//         }
// 
//         try {
//             Class<?> injectorClass = Class.forName(clsName + INJECTOR_SUFFIX);
//             //noinspection unchecked
//             injector = (Injector<Object>) injectorClass.newInstance();
//             if (debug) Log.d(TAG, "HIT: Class loaded injection class.");
//         } catch (ClassNotFoundException e) {
//             if (debug) Log.d(TAG, "Not found. Trying superclass " + cls.getSuperclass().getName());
//             injector = findInjectorForClass(cls.getSuperclass());
//         }
//         INJECTORS.put(cls, injector);
//         return injector;
//     }
// 
// }


// Path: app/src/main/java/com/tale/prettybundle/sample/fragments/TestPrimaryExtraFragment.java
import android.app.Fragment;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import com.tale.prettybundle.Extra;
import com.tale.prettybundle.PrettyBundle;
import com.tale.prettybundle.sample.R;
import butterknife.ButterKnife;
import butterknife.InjectView;

package com.tale.prettybundle.sample.fragments;




/**
 * Created by giang on 2/26/15.
 */
public class TestPrimaryExtraFragment extends Fragment {

    @Extra int intVal = 0;
    @Extra long longVal = 0;
    @Extra float floatVal = 0;
    @Extra double doubleVal = 0;
    @Extra boolean booleanVal = false;
    @Extra String stringVal = "Default";
    @Extra CharSequence charSequenceVal = "Default";