// Path: kratos/src/main/java/kratos/internal/KBinder.java
// public interface KBinder<T> {
//     void bind(T target, KFinder finder);
// }
// 
// Path: kratos/src/main/java/kratos/internal/KFinder.java
// public enum KFinder {
//     ACTIVITY {
//         @Override
//         protected View findView(Object source, int id) {
//             return ((Activity) source).findViewById(id);
//         }
// 
//         @Override
//         public Context getContext(Object source) {
//             return (Activity) source;
//         }
//     },
//     KCARD {
//         @Override
//         protected View findView(Object source, int id) {
//             KCard card = (KCard) source;
//             return (card.getRootView()).findViewById(id);
//         }
// 
//         @Override
//         public Context getContext(Object source) {
//             return ((KCard) source).getContext();
//         }
//     };
// 
//     @SuppressWarnings("unchecked") // That's the point.
//     public <T> T castView(View view) {
//         try {
//             return (T) view;
//         } catch (ClassCastException e) {
//             e.printStackTrace();
//             return null;
//         }
//     }
// 
//     public <T> T findRequiredView(Object source, int id) {
//         T view = findOptionalView(source, id);
//         if (view == null) {
//             throw new IllegalStateException("Required view"
//                     + "with ID "
//                     + id);
//         }
//         return view;
//     }
// 
//     public <T> T findOptionalView(Object source, int id) {
//         View view = findView(source, id);
//         return castView(view);
//     }
// 
//     protected abstract View findView(Object source, int id);
// 
//     public abstract Context getContext(Object source);
// }


import android.app.Activity;
import android.support.annotation.NonNull;
import android.util.Log;
import java.util.LinkedHashMap;
import java.util.Map;
import kratos.card.KCard;
import kratos.internal.KBinder;
import kratos.internal.KFinder;
package kratos;




/**
 * Created by merlin on 15/12/7.
 */
public final class Kratos {
    private Kratos() {
    }

    private static final String TAG = "Kratos";

    static final Map<Class<?>, KBinder<Object>> BINDERS = new LinkedHashMap<>();
    static final KBinder<Object> NOP_VIEW_BINDER = new KBinder<Object>() {
        @Override
// Path: kratos/src/main/java/kratos/internal/KBinder.java
// public interface KBinder<T> {
//     void bind(T target, KFinder finder);
// }
// 
// Path: kratos/src/main/java/kratos/internal/KFinder.java
// public enum KFinder {
//     ACTIVITY {
//         @Override
//         protected View findView(Object source, int id) {
//             return ((Activity) source).findViewById(id);
//         }
// 
//         @Override
//         public Context getContext(Object source) {
//             return (Activity) source;
//         }
//     },
//     KCARD {
//         @Override
//         protected View findView(Object source, int id) {
//             KCard card = (KCard) source;
//             return (card.getRootView()).findViewById(id);
//         }
// 
//         @Override
//         public Context getContext(Object source) {
//             return ((KCard) source).getContext();
//         }
//     };
// 
//     @SuppressWarnings("unchecked") // That's the point.
//     public <T> T castView(View view) {
//         try {
//             return (T) view;
//         } catch (ClassCastException e) {
//             e.printStackTrace();
//             return null;
//         }
//     }
// 
//     public <T> T findRequiredView(Object source, int id) {
//         T view = findOptionalView(source, id);
//         if (view == null) {
//             throw new IllegalStateException("Required view"
//                     + "with ID "
//                     + id);
//         }
//         return view;
//     }
// 
//     public <T> T findOptionalView(Object source, int id) {
//         View view = findView(source, id);
//         return castView(view);
//     }
// 
//     protected abstract View findView(Object source, int id);
// 
//     public abstract Context getContext(Object source);
// }


// Path: kratos/src/main/java/kratos/Kratos.java
import android.app.Activity;
import android.support.annotation.NonNull;
import android.util.Log;
import java.util.LinkedHashMap;
import java.util.Map;
import kratos.card.KCard;
import kratos.internal.KBinder;
import kratos.internal.KFinder;

package kratos;




/**
 * Created by merlin on 15/12/7.
 */
public final class Kratos {
    private Kratos() {
    }

    private static final String TAG = "Kratos";

    static final Map<Class<?>, KBinder<Object>> BINDERS = new LinkedHashMap<>();
    static final KBinder<Object> NOP_VIEW_BINDER = new KBinder<Object>() {
        @Override
        public void bind(Object target, KFinder finder) {