Added param, type, returnType conditions functions in FieldFinder, MethodFinder, ConstructorFinder, FieldRules, MethodRules, ConstructorRules and fix some bugs in ReflectionTool

This commit is contained in:
2022-12-31 02:21:00 +08:00
parent 3fe9ec9b0f
commit 449158879c
28 changed files with 745 additions and 57 deletions

View File

@@ -67,6 +67,7 @@ const navigationLinks = {
baseApiPath + 'hook/core/finder/base/rules/CountRules',
baseApiPath + 'hook/core/finder/base/rules/ModifierRules',
baseApiPath + 'hook/core/finder/base/rules/NameRules',
baseApiPath + 'hook/core/finder/base/rules/ObjectRules',
baseApiPath + 'hook/bean/HookClass',
baseApiPath + 'hook/bean/VariousClass',
baseApiPath + 'hook/bean/CurrentClass',

View File

@@ -0,0 +1,27 @@
---
pageClass: code-page
---
::: warning
The English translation of this page has not been completed, you are welcome to contribute translations to us.
You can use the **Chrome Translation Plugin** to translate entire pages for reference.
:::
# ObjectRules <span class="symbol">- class</span>
```kotlin:no-line-numbers
class ObjectRules private constructor(private val instance: Any)
```
**Change Records**
`v1.1.5` `added`
**Function Illustrate**
> 这是一个任意对象条件实现类。
可对 R8 混淆后的 `Class`、`Member` 进行更加详细的定位。

View File

@@ -98,6 +98,28 @@ fun param(vararg paramType: Any)
:::
## param <span class="symbol">- method</span>
```kotlin:no-line-numbers
fun param(conditions: ObjectsConditions)
```
**Change Records**
`v1.1.5` `added`
**Function Illustrate**
> 设置 `Constructor` 参数条件。
::: danger
无参 **Constructor** 请使用 **emptyParam** 设置查找条件。
有参 **Constructor** 必须使用此方法设定参数或使用 **paramCount** 指定个数。
:::
## paramCount <span class="symbol">- method</span>
```kotlin:no-line-numbers

View File

@@ -82,4 +82,20 @@ fun name(conditions: NameConditions)
**Function Illustrate**
> 设置 `Field` 名称条件。
> 设置 `Field` 名称条件。
## type <span class="symbol">- method</span>
```kotlin:no-line-numbers
fun type(conditions: ObjectConditions)
```
**Change Records**
`v1.1.5` `added`
**Function Illustrate**
> 设置 `Field` 类型条件。
可不填写类型。

View File

@@ -128,6 +128,28 @@ fun param(vararg paramType: Any)
:::
## param <span class="symbol">- method</span>
```kotlin:no-line-numbers
fun param(conditions: ObjectsConditions)
```
**Change Records**
`v1.1.5` `added`
**Function Illustrate**
> 设置 `Method` 参数条件。
::: danger
无参 **Method** 请使用 **emptyParam** 设置查找条件。
有参 **Method** 必须使用此方法设定参数或使用 **paramCount** 指定个数。
:::
## name <span class="symbol">- method</span>
```kotlin:no-line-numbers
@@ -172,4 +194,20 @@ fun paramCount(conditions: CountConditions)
> 设置 `Method` 参数个数条件。
你可以不使用 `param` 指定参数类型而是仅使用此方法指定参数个数条件。
你可以不使用 `param` 指定参数类型而是仅使用此方法指定参数个数条件。
## returnType <span class="symbol">- method</span>
```kotlin:no-line-numbers
fun returnType(conditions: ObjectConditions)
```
**Change Records**
`v1.1.5` `added`
**Function Illustrate**
> 设置 `Method` 返回值条件。
可不填写返回值。

View File

@@ -124,6 +124,30 @@ fun param(vararg paramType: Any): IndexTypeCondition
:::
## param <span class="symbol">- method</span>
```kotlin:no-line-numbers
fun param(conditions: ObjectsConditions): IndexTypeCondition
```
**Change Records**
`v1.1.5` `added`
**Function Illustrate**
> 设置 `Constructor` 参数条件。
::: danger
无参 **Constructor** 请使用 **emptyParam** 设置查找条件。
有参 **Constructor** 必须使用此方法设定参数或使用 **paramCount** 指定个数。
存在多个 **IndexTypeCondition** 时除了 **order** 只会生效最后一个。
:::
## paramCount <span class="symbol">- method</span>
```kotlin:no-line-numbers

View File

@@ -188,10 +188,32 @@ fun type(value: Any): IndexTypeCondition
> 设置 `Field` 类型。
可不填写类型。
::: danger
存在多个 **IndexTypeCondition** 时除了 **order** 只会生效最后一个。
:::
## type <span class="symbol">- method</span>
```kotlin:no-line-numbers
fun type(conditions: ObjectConditions): IndexTypeCondition
```
**Change Records**
`v1.1.5` `added`
**Function Illustrate**
> 设置 `Field` 类型条件。
可不填写类型。
::: danger
存在多个 **IndexTypeCondition** 时除了 **order** 只会生效最后一个。
:::

View File

@@ -162,6 +162,30 @@ fun param(vararg paramType: Any): IndexTypeCondition
:::
## param <span class="symbol">- method</span>
```kotlin:no-line-numbers
fun param(conditions: ObjectsConditions): IndexTypeCondition
```
**Change Records**
`v1.1.5` `added`
**Function Illustrate**
> 设置 `Method` 参数条件。
::: danger
无参 **Method** 请使用 **emptyParam** 设置查找条件。
有参 **Method** 必须使用此方法设定参数或使用 **paramCount** 指定个数。
存在多个 **IndexTypeCondition** 时除了 **order** 只会生效最后一个。
:::
## order <span class="symbol">- method</span>
```kotlin:no-line-numbers
@@ -314,6 +338,28 @@ fun returnType(value: Any): IndexTypeCondition
:::
## returnType <span class="symbol">- method</span>
```kotlin:no-line-numbers
fun returnType(conditions: ObjectConditions): IndexTypeCondition
```
**Change Records**
`v1.1.5` `added`
**Function Illustrate**
> 设置 `Method` 返回值条件。
可不填写返回值。
::: danger
存在多个 **IndexTypeCondition** 时除了 **order** 只会生效最后一个。
:::
## superClass <span class="symbol">- method</span>
```kotlin:no-line-numbers

View File

@@ -0,0 +1,19 @@
---
pageClass: code-page
---
# ObjectRules <span class="symbol">- class</span>
```kotlin:no-line-numbers
class ObjectRules private constructor(private val instance: Any)
```
**变更记录**
`v1.1.5` `新增`
**功能描述**
> 这是一个任意对象条件实现类。
可对 R8 混淆后的 `Class`、`Member` 进行更加详细的定位。

View File

@@ -90,6 +90,28 @@ fun param(vararg paramType: Any)
:::
## param <span class="symbol">- method</span>
```kotlin:no-line-numbers
fun param(conditions: ObjectsConditions)
```
**变更记录**
`v1.1.5` `新增`
**功能描述**
> 设置 `Constructor` 参数条件。
::: danger
无参 **Constructor** 请使用 **emptyParam** 设置查找条件。
有参 **Constructor** 必须使用此方法设定参数或使用 **paramCount** 指定个数。
:::
## paramCount <span class="symbol">- method</span>
```kotlin:no-line-numbers

View File

@@ -74,4 +74,20 @@ fun name(conditions: NameConditions)
**功能描述**
> 设置 `Field` 名称条件。
> 设置 `Field` 名称条件。
## type <span class="symbol">- method</span>
```kotlin:no-line-numbers
fun type(conditions: ObjectConditions)
```
**变更记录**
`v1.1.5` `新增`
**功能描述**
> 设置 `Field` 类型条件。
可不填写类型。

View File

@@ -120,6 +120,28 @@ fun param(vararg paramType: Any)
:::
## param <span class="symbol">- method</span>
```kotlin:no-line-numbers
fun param(conditions: ObjectsConditions)
```
**变更记录**
`v1.1.5` `新增`
**功能描述**
> 设置 `Method` 参数条件。
::: danger
无参 **Method** 请使用 **emptyParam** 设置查找条件。
有参 **Method** 必须使用此方法设定参数或使用 **paramCount** 指定个数。
:::
## name <span class="symbol">- method</span>
```kotlin:no-line-numbers
@@ -164,4 +186,20 @@ fun paramCount(conditions: CountConditions)
> 设置 `Method` 参数个数条件。
你可以不使用 `param` 指定参数类型而是仅使用此方法指定参数个数条件。
你可以不使用 `param` 指定参数类型而是仅使用此方法指定参数个数条件。
## returnType <span class="symbol">- method</span>
```kotlin:no-line-numbers
fun returnType(conditions: ObjectConditions)
```
**变更记录**
`v1.1.5` `新增`
**功能描述**
> 设置 `Method` 返回值条件。
可不填写返回值。

View File

@@ -116,6 +116,30 @@ fun param(vararg paramType: Any): IndexTypeCondition
:::
## param <span class="symbol">- method</span>
```kotlin:no-line-numbers
fun param(conditions: ObjectsConditions): IndexTypeCondition
```
**变更记录**
`v1.1.5` `新增`
**功能描述**
> 设置 `Constructor` 参数条件。
::: danger
无参 **Constructor** 请使用 **emptyParam** 设置查找条件。
有参 **Constructor** 必须使用此方法设定参数或使用 **paramCount** 指定个数。
存在多个 **IndexTypeCondition** 时除了 **order** 只会生效最后一个。
:::
## paramCount <span class="symbol">- method</span>
```kotlin:no-line-numbers

View File

@@ -180,10 +180,32 @@ fun type(value: Any): IndexTypeCondition
> 设置 `Field` 类型。
可不填写类型。
::: danger
存在多个 **IndexTypeCondition** 时除了 **order** 只会生效最后一个。
:::
## type <span class="symbol">- method</span>
```kotlin:no-line-numbers
fun type(conditions: ObjectConditions): IndexTypeCondition
```
**变更记录**
`v1.1.5` `新增`
**功能描述**
> 设置 `Field` 类型条件。
可不填写类型。
::: danger
存在多个 **IndexTypeCondition** 时除了 **order** 只会生效最后一个。
:::

View File

@@ -154,6 +154,30 @@ fun param(vararg paramType: Any): IndexTypeCondition
:::
## param <span class="symbol">- method</span>
```kotlin:no-line-numbers
fun param(conditions: ObjectsConditions): IndexTypeCondition
```
**变更记录**
`v1.1.5` `新增`
**功能描述**
> 设置 `Method` 参数条件。
::: danger
无参 **Method** 请使用 **emptyParam** 设置查找条件。
有参 **Method** 必须使用此方法设定参数或使用 **paramCount** 指定个数。
存在多个 **IndexTypeCondition** 时除了 **order** 只会生效最后一个。
:::
## order <span class="symbol">- method</span>
```kotlin:no-line-numbers
@@ -306,6 +330,28 @@ fun returnType(value: Any): IndexTypeCondition
:::
## returnType <span class="symbol">- method</span>
```kotlin:no-line-numbers
fun returnType(conditions: ObjectConditions): IndexTypeCondition
```
**变更记录**
`v1.1.5` `新增`
**功能描述**
> 设置 `Method` 返回值条件。
可不填写返回值。
::: danger
存在多个 **IndexTypeCondition** 时除了 **order** 只会生效最后一个。
:::
## superClass <span class="symbol">- method</span>
```kotlin:no-line-numbers