// Path: surgeon-core/src/main/java/com/surgeon/weaving/core/TargetHandle.java
// public class TargetHandle {
// 
//     private Object target;
//     private ProceedingJoinPoint origin;
// 
//     TargetHandle(ProceedingJoinPoint origin) {
//         if (origin != null) {
//             this.origin = origin;
//             this.target = origin.getThis();
//         }
//     }
// 
//     /**
//      * Invoke target function with new params.
//      *
//      * @param params input params
//      * @return new result
//      */
//     public Object proceed(Object... params) throws Throwable {
//         if (origin != null) {
//             return origin.proceed(params);
//         }
//         return null;
//     }
// 
//     /**
//      * Get function owner object.
//      *
//      * @return The target function owner.
//      */
//     public Object getTarget() {
//         return target;
//     }
// }
// 
// Path: surgeon-core/src/main/java/com/surgeon/weaving/core/interfaces/ISurgeon.java
// public interface ISurgeon {
// 
//     /**
//      * Control current object to singleton.
//      */
//     boolean singleton();
// }


import android.view.View;
import android.widget.Toast;
import com.surgeon.weaving.annotations.Replace;
import com.surgeon.weaving.core.TargetHandle;
import com.surgeon.weaving.core.interfaces.ISurgeon;
package com.tangxiaolv.surgeon;



public class HotReplace implements ISurgeon {

    /**
     * Replace target override function
     *
     * @param handle {@link TargetHandle}
     * @param view   origin params
     */
    @Replace(namespace = "com.tangxiaolv.sdk.SDKActivity", function = "oneClick")
    public void showToast(TargetHandle handle, View view) {
// Path: surgeon-core/src/main/java/com/surgeon/weaving/core/TargetHandle.java
// public class TargetHandle {
// 
//     private Object target;
//     private ProceedingJoinPoint origin;
// 
//     TargetHandle(ProceedingJoinPoint origin) {
//         if (origin != null) {
//             this.origin = origin;
//             this.target = origin.getThis();
//         }
//     }
// 
//     /**
//      * Invoke target function with new params.
//      *
//      * @param params input params
//      * @return new result
//      */
//     public Object proceed(Object... params) throws Throwable {
//         if (origin != null) {
//             return origin.proceed(params);
//         }
//         return null;
//     }
// 
//     /**
//      * Get function owner object.
//      *
//      * @return The target function owner.
//      */
//     public Object getTarget() {
//         return target;
//     }
// }
// 
// Path: surgeon-core/src/main/java/com/surgeon/weaving/core/interfaces/ISurgeon.java
// public interface ISurgeon {
// 
//     /**
//      * Control current object to singleton.
//      */
//     boolean singleton();
// }


// Path: example/simple/src/main/java/com/tangxiaolv/surgeon/HotReplace.java
import android.view.View;
import android.widget.Toast;
import com.surgeon.weaving.annotations.Replace;
import com.surgeon.weaving.core.TargetHandle;
import com.surgeon.weaving.core.interfaces.ISurgeon;

package com.tangxiaolv.surgeon;



public class HotReplace implements ISurgeon {

    /**
     * Replace target override function
     *
     * @param handle {@link TargetHandle}
     * @param view   origin params
     */
    @Replace(namespace = "com.tangxiaolv.sdk.SDKActivity", function = "oneClick")
    public void showToast(TargetHandle handle, View view) {
        Toast.makeText(view.getContext(), "Hack！！！", Toast.LENGTH_SHORT).show();