instead

inline fun <T> PatcherAPI.instead(vararg paramTypes: Class<*>, crossinline callback: InsteadHookCallback<T>): Runnable

Replaces a constructor of a class.

Return

The Runnable object of the patch

Parameters

paramTypes

parameters of the method. Useful for patching individual overloads

callback

callback for the patch

See also

XC_MethodHook.beforeHookedMethod

inline fun <T> PatcherAPI.instead(methodName: String, vararg paramTypes: Class<*>, crossinline callback: InsteadHookCallback<T>): Runnable

Replaces a method of a class.

Return

The Runnable object of the patch

Parameters

methodName

name of the method to patch

paramTypes

parameters of the method. Useful for patching individual overloads

callback

callback for the patch

See also

XC_MethodHook.beforeHookedMethod