// Path: src/com/kk/binding/listener/ListenerToCommand.java
// public abstract class ListenerToCommand {
//     private ICommand mCommand;
//     private Object param;
// 
//     public Object getParam() {
//         return param;
//     }
// 
//     public void setParam(Object param) {
//         this.param = param;
//     }
// 
//     public ICommand getCommand() {
//         return mCommand;
//     }
// 
//     public void setCommand(ICommand command) {
//         mCommand = command;
//     }
// 
//     public void executeCommand(View view, Object... args) {
//         if (mCommand != null)
//             try {
//                 mCommand.execute(view, args);
//             } catch (Exception e) {
//                 BindLog.e("ListenerToCommand", "executeCommand failed " + e.toString());
//             }
//     }
// 
//     public abstract void registerToView(View v);
// }
// 
// Path: src/com/kk/binding/listener/OnClickListenerImp.java
// public class OnClickListenerImp extends ListenerToCommand implements View.OnClickListener {
//     @Override
//     public void registerToView(View v) {
//         v.setOnClickListener(this);
//     }
// 
//     @Override
//     public void onClick(View v) {
//         executeCommand(v, getParam());
//     }
// }
// 
// Path: src/com/kk/binding/listener/OnFocusChangeListenerImp.java
// public class OnFocusChangeListenerImp extends ListenerToCommand implements View.OnFocusChangeListener {
//     @Override public void registerToView(View v) {
//         v.setOnFocusChangeListener(this);
//     }
// 
//     @Override public void onFocusChange(View v, boolean hasFocus) {
//         executeCommand(v, hasFocus);
//     }
// }
// 
// Path: src/com/kk/binding/listener/OnItemClickListenerImp.java
// public class OnItemClickListenerImp extends ListenerToCommand implements OnItemClickListener {
// 	@Override
// 	public void registerToView(View v) {
// 		if (!(v instanceof AdapterView<?>))
// 			return;
// 		((AdapterView<?>) v).setOnItemClickListener(this);
// 	}
// 
// 	@Override
// 	public void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {
// 		executeCommand(arg0, arg1, arg2, arg3);
// 	}
// }
// 
// Path: src/com/kk/binding/util/StringUtil.java
// public class StringUtil {
//     public static boolean isNullOrEmpty(String str) {
//         return str == null || str.isEmpty();
//     }
// 
//     public static boolean compare(String str1, String str2) {
//         return (str1 == null || str2 == null) ? str1 == str2 : str1.equals(str2);
//     }
// }


import com.kk.binding.listener.ListenerToCommand;
import com.kk.binding.listener.OnClickListenerImp;
import com.kk.binding.listener.OnFocusChangeListenerImp;
import com.kk.binding.listener.OnItemClickListenerImp;
import com.kk.binding.util.StringUtil;
import java.util.HashMap;
/*
 * Copyright (C) 2014 kk-team.com.
 *
 * 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 com.kk.binding.register;



/**
 * Created by xj on 14-1-6.
 */
public class ListenerImpRegister {
    private static final String TAG = "Binding-ListenerImpRegister";
    private static HashMap<String, Class<? extends ListenerToCommand>> listenerImps;

    public static HashMap<String, Class<? extends ListenerToCommand>> getListenerImps() {
        if (listenerImps == null) {
            listenerImps = new HashMap<String, Class<? extends ListenerToCommand>>(32);
// Path: src/com/kk/binding/listener/ListenerToCommand.java
// public abstract class ListenerToCommand {
//     private ICommand mCommand;
//     private Object param;
// 
//     public Object getParam() {
//         return param;
//     }
// 
//     public void setParam(Object param) {
//         this.param = param;
//     }
// 
//     public ICommand getCommand() {
//         return mCommand;
//     }
// 
//     public void setCommand(ICommand command) {
//         mCommand = command;
//     }
// 
//     public void executeCommand(View view, Object... args) {
//         if (mCommand != null)
//             try {
//                 mCommand.execute(view, args);
//             } catch (Exception e) {
//                 BindLog.e("ListenerToCommand", "executeCommand failed " + e.toString());
//             }
//     }
// 
//     public abstract void registerToView(View v);
// }
// 
// Path: src/com/kk/binding/listener/OnClickListenerImp.java
// public class OnClickListenerImp extends ListenerToCommand implements View.OnClickListener {
//     @Override
//     public void registerToView(View v) {
//         v.setOnClickListener(this);
//     }
// 
//     @Override
//     public void onClick(View v) {
//         executeCommand(v, getParam());
//     }
// }
// 
// Path: src/com/kk/binding/listener/OnFocusChangeListenerImp.java
// public class OnFocusChangeListenerImp extends ListenerToCommand implements View.OnFocusChangeListener {
//     @Override public void registerToView(View v) {
//         v.setOnFocusChangeListener(this);
//     }
// 
//     @Override public void onFocusChange(View v, boolean hasFocus) {
//         executeCommand(v, hasFocus);
//     }
// }
// 
// Path: src/com/kk/binding/listener/OnItemClickListenerImp.java
// public class OnItemClickListenerImp extends ListenerToCommand implements OnItemClickListener {
// 	@Override
// 	public void registerToView(View v) {
// 		if (!(v instanceof AdapterView<?>))
// 			return;
// 		((AdapterView<?>) v).setOnItemClickListener(this);
// 	}
// 
// 	@Override
// 	public void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {
// 		executeCommand(arg0, arg1, arg2, arg3);
// 	}
// }
// 
// Path: src/com/kk/binding/util/StringUtil.java
// public class StringUtil {
//     public static boolean isNullOrEmpty(String str) {
//         return str == null || str.isEmpty();
//     }
// 
//     public static boolean compare(String str1, String str2) {
//         return (str1 == null || str2 == null) ? str1 == str2 : str1.equals(str2);
//     }
// }


// Path: src/com/kk/binding/register/ListenerImpRegister.java
import com.kk.binding.listener.ListenerToCommand;
import com.kk.binding.listener.OnClickListenerImp;
import com.kk.binding.listener.OnFocusChangeListenerImp;
import com.kk.binding.listener.OnItemClickListenerImp;
import com.kk.binding.util.StringUtil;
import java.util.HashMap;

/*
 * Copyright (C) 2014 kk-team.com.
 *
 * 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 com.kk.binding.register;



/**
 * Created by xj on 14-1-6.
 */
public class ListenerImpRegister {
    private static final String TAG = "Binding-ListenerImpRegister";
    private static HashMap<String, Class<? extends ListenerToCommand>> listenerImps;

    public static HashMap<String, Class<? extends ListenerToCommand>> getListenerImps() {
        if (listenerImps == null) {
            listenerImps = new HashMap<String, Class<? extends ListenerToCommand>>(32);
            registerInner();