Added NameConditions function

This commit is contained in:
2022-05-16 03:58:15 +08:00
parent 3a1f6e6cb7
commit 48af06b2e7
9 changed files with 662 additions and 6 deletions

View File

@@ -60,6 +60,8 @@
[filename](public/ModifierRules.md ':include')
[filename](public/NameConditions.md ':include')
[filename](public/HookClass.md ':include')
[filename](public/VariousClass.md ':include')

View File

@@ -114,6 +114,24 @@ fun name(value: String): IndexTypeCondition
!> 存在多个 `IndexTypeCondition` 时除了 `order` 只会生效最后一个。
### name [method]
```kotlin
inline fun name(initiate: NameConditions.() -> Unit): IndexTypeCondition
```
**变更记录**
`v1.0.88` `新增`
**功能描述**
> 设置 `Field` 名称条件。
!> 若不填写名称则必须存在一个其它条件,默认模糊查找并取第一个匹配的 `Field`
!> 存在多个 `IndexTypeCondition` 时除了 `order` 只会生效最后一个。
### type [method]
```kotlin

View File

@@ -158,6 +158,24 @@ fun name(value: String): IndexTypeCondition
!> 存在多个 `IndexTypeCondition` 时除了 `order` 只会生效最后一个。
### name [method]
```kotlin
inline fun name(initiate: NameConditions.() -> Unit): IndexTypeCondition
```
**变更记录**
`v1.0.88` `新增`
**功能描述**
> 设置 `Method` 名称条件。
!> 若不填写名称则必须存在一个其它条件,默认模糊查找并取第一个匹配的 `Method`
!> 存在多个 `IndexTypeCondition` 时除了 `order` 只会生效最后一个。
### paramCount [method]
```kotlin

View File

@@ -0,0 +1,191 @@
## NameConditions [class]
```kotlin
class NameConditions
```
**变更记录**
`v1.0.88` `新增`
**功能描述**
> 这是一个模糊 `Member` 名称匹配实现类
可对 R8 混淆后的 `Member` 进行更加详细的定位。
### equalsOf
```kotlin
fun equalsOf(other: String, isIgnoreCase: Boolean)
```
**变更记录**
`v1.0.88` `新增`
**功能描述**
> 完全字符匹配。
### startsWith
```kotlin
fun startsWith(prefix: String, startIndex: Int, isIgnoreCase: Boolean)
```
**变更记录**
`v1.0.88` `新增`
**功能描述**
> 起始字符匹配。
### endsWith
```kotlin
fun endsWith(suffix: String, isIgnoreCase: Boolean)
```
**变更记录**
`v1.0.88` `新增`
**功能描述**
> 结束字符匹配。
### contains
```kotlin
fun contains(other: String, isIgnoreCase: Boolean)
```
**变更记录**
`v1.0.88` `新增`
**功能描述**
> 包含字符匹配。
### matches
```kotlin
fun matches(regex: String)
```
```kotlin
fun matches(regex: Regex)
```
**变更记录**
`v1.0.88` `新增`
**功能描述**
> 正则字符匹配。
### thisSynthetic0
```kotlin
fun thisSynthetic0()
```
**变更记录**
`v1.0.88` `新增`
**功能描述**
> 标识为匿名类的主类调用对象。
### onlySymbols
```kotlin
fun onlySymbols()
```
**变更记录**
`v1.0.88` `新增`
**功能描述**
> 标识为只有符号。
### onlyLetters
```kotlin
fun onlyLetters()
```
**变更记录**
`v1.0.88` `新增`
**功能描述**
> 标识为只有字母。
### onlyNumbers
```kotlin
fun onlyNumbers()
```
**变更记录**
`v1.0.88` `新增`
**功能描述**
> 标识为只有数字。
### onlyLettersNumbers
```kotlin
fun onlyLettersNumbers()
```
**变更记录**
`v1.0.88` `新增`
**功能描述**
> 标识为只有字母或数字。
### onlyLowercase
```kotlin
fun onlyLowercase()
```
**变更记录**
`v1.0.88` `新增`
**功能描述**
> 标识为只有小写字母。
在没有其它条件的情况下设置此条件允许判断对象存在字母以外的字符。
### onlyUppercase
```kotlin
fun onlyUppercase()
```
**变更记录**
`v1.0.88` `新增`
**功能描述**
> 标识为只有大写字母。
在没有其它条件的情况下设置此条件允许判断对象存在字母以外的字符。