mirror of
https://github.com/HighCapable/YukiHookAPI.git
synced 2025-09-04 09:45:19 +08:00
Update move-to-new-api documentation
This commit is contained in:
@@ -136,6 +136,8 @@ afterHook {
|
||||
result = ...
|
||||
// Remove the content of the return value
|
||||
resultNull()
|
||||
// Get the data storage instance within the scope of the current callback method body
|
||||
dataExtra
|
||||
// Throw an exception to the Hook app
|
||||
Throwable("Fatal").throwToApp()
|
||||
// Execute the original method without hook and call with the original method parameters, generics can be omitted
|
||||
@@ -174,6 +176,8 @@ override fun afterHookedMethod(param: MethodHookParam) {
|
||||
param.result = ...
|
||||
// Remove the content of the return value
|
||||
param.result = null
|
||||
// Get the data storage instance within the scope of the current callback method body
|
||||
param.extra
|
||||
// Throw an exception to the Hook app
|
||||
param.throwable = Throwable("Fatal")
|
||||
// Execute the original method without hooking
|
||||
|
@@ -136,6 +136,8 @@ afterHook {
|
||||
result = ...
|
||||
// 删除返回值内容
|
||||
resultNull()
|
||||
// 获取当前回调方法体范围内的数据存储实例
|
||||
dataExtra
|
||||
// 向 Hook APP 抛出异常
|
||||
Throwable("Fatal").throwToApp()
|
||||
// 执行未经 Hook 的原始方法并使用原始方法参数调用,泛型可略
|
||||
@@ -174,6 +176,8 @@ override fun afterHookedMethod(param: MethodHookParam) {
|
||||
param.result = ...
|
||||
// 删除返回值内容
|
||||
param.result = null
|
||||
// 获取当前回调方法体范围内的数据存储实例
|
||||
param.extra
|
||||
// 向 Hook APP 抛出异常
|
||||
param.throwable = Throwable("Fatal")
|
||||
// 执行未经 Hook 的原始方法
|
||||
|
Reference in New Issue
Block a user