createHooks

fun createHooks(methods: Iterable<Method>, callback: IMethodHook): List<XposedInterface.HookHandle>

为方法列表批量创建普通 hook。

Parameters

methods

目标方法列表

callback

before / after 回调


fun createHooks(methods: Iterable<Method>, key: String, callback: IMethodHook): List<XposedInterface.HookHandle>

为方法列表创建带同一稳定 reloadKey 的普通 hook。


fun createHooks(methods: Iterable<Method>, callback: IReplaceHook): List<XposedInterface.HookHandle>

为方法列表批量创建替换 hook。

Parameters

methods

目标方法列表

callback

replace 回调,返回值会作为原方法结果


fun createHooks(methods: Iterable<Method>, key: String, callback: IReplaceHook): List<XposedInterface.HookHandle>

为方法列表创建带同一稳定 reloadKey 的替换 hook。