docs: update api-example, example, move-to-new-api, reflection

This commit is contained in:
2023-10-02 22:41:35 +08:00
parent 3ca7f4b017
commit ea86a2b60a
8 changed files with 34 additions and 118 deletions

View File

@@ -1525,15 +1525,7 @@ VariousClass("com.demo.ATest", "com.demo.BTest").toClass().method {
若在创建 Hook 的时候使用,可以更加方便,还可以自动拦截找不到 `Class` 的异常。
> 示例如下
```kotlin
findClass("com.demo.ATest", "com.demo.BTest").hook {
// Your code here.
}
```
你还可以把这个 `Class` 定义为一个常量类型来使用。
你可以把这个 `Class` 定义为一个常量类型来使用。
> 示例如下
@@ -1546,12 +1538,6 @@ ABTestClass.hook {
}
```
::: tip
更多功能请参考 [PackageParam.findClass](../public/com/highcapable/yukihookapi/hook/param/PackageParam#findclass-method) 方法。
:::
### 调用泛型
在反射过程中,我们可能会遇到泛型问题,在泛型的反射处理上,`YukiHookAPI` 同样提供了一个可在任意地方使用的语法糖。