Modify organize documentation

This commit is contained in:
2022-08-17 02:03:10 +08:00
parent 44d4f7c29c
commit 134a45f3e0
55 changed files with 557 additions and 524 deletions

View File

@@ -266,4 +266,4 @@
- 首个版本提交至 Maven
<br/><br/>
[浏览下一篇 ➡️](about/future.md)
[浏览下一篇 &nbsp;➡️](about/future.md)

View File

@@ -11,4 +11,4 @@
感谢您选择并使用 `YukiHookAPI`,如有代码相关的建议和请求,可在 Github 提交 Pull Request。
<br/><br/>
[浏览下一篇 ➡️](about/about.md)
[浏览下一篇 &nbsp;➡️](about/about.md)

View File

@@ -35,4 +35,4 @@ API 已经提供了 Xposed 原生 API 监听接口,你可以 [在这里](confi
大部分 `inline hook` 没有 `Java` 兼容层,后期可能会考虑 `native hook``Java` 兼容层适配。
<br/><br/>
[浏览下一篇 ➡️](about/contacts.md)
[浏览下一篇 &nbsp;➡️](about/contacts.md)

View File

@@ -77,4 +77,4 @@
[filename](public/HookResources.md ':include')
<br/><br/>
[浏览下一篇 ➡️](about/changelog.md)
[浏览下一篇 &nbsp;➡️](about/changelog.md)

View File

@@ -22,5 +22,31 @@
后期被删除的功能将标记为 `v$version` `移除` 并会标注删除线。
## 相关符号说明
- *kt* &nbsp;Kotlin Static File
- *annotation* &nbsp;注解
- *interface* &nbsp;接口
- *object* &nbsp;类 (单例)
- *class* &nbsp;
- *field* &nbsp;变量或 `get``set` 方法或只读的 `get` 方法
- *method* &nbsp;方法
- *enum* &nbsp;Enum 常量
- *ext-field* &nbsp;扩展的变量 (全局)
- *ext-method* &nbsp;扩展的方法 (全局)
- *i-ext-field* &nbsp;扩展的变量 (调用域限制)
- *i-ext-method* &nbsp;扩展的方法 (调用域限制)
<br/><br/>
[浏览下一篇 ➡️](api/document)
[浏览下一篇 &nbsp;➡️](api/document)

View File

@@ -1,4 +1,4 @@
## BaseFinder.IndexTypeCondition [class]
## BaseFinder.IndexTypeCondition *- class*
```kotlin
inner class IndexTypeCondition internal constructor(private val type: IndexConfigType)
@@ -12,7 +12,7 @@ inner class IndexTypeCondition internal constructor(private val type: IndexConfi
> 字节码下标筛选实现类。
### index [method]
### index *- method*
```kotlin
fun index(num: Int)
@@ -30,7 +30,7 @@ fun index(num: Int)
可使用 `IndexTypeConditionSort.first``IndexTypeConditionSort.last` 设置首位和末位筛选条件。
### index [method]
### index *- method*
```kotlin
fun index(): IndexTypeConditionSort
@@ -44,7 +44,7 @@ fun index(): IndexTypeConditionSort
> 得到下标。
### IndexTypeConditionSort [class]
### IndexTypeConditionSort *- class*
```kotlin
inner class IndexTypeConditionSort internal constructor()
@@ -58,7 +58,7 @@ inner class IndexTypeConditionSort internal constructor()
> 字节码下标排序实现类。
#### first [method]
#### first *- method*
```kotlin
fun first()
@@ -72,7 +72,7 @@ fun first()
> 设置满足条件的第一个。
#### last [method]
#### last *- method*
```kotlin
fun last()
@@ -86,7 +86,7 @@ fun last()
> 设置满足条件的最后一个。
#### reverse [method]
#### reverse *- method*
```kotlin
fun reverse(num: Int)

View File

@@ -1,4 +1,4 @@
## ChannelData [class]
## ChannelData *- class*
```kotlin
data class ChannelData<T>(var key: String, var value: T?)

View File

@@ -1,4 +1,4 @@
## ComponentTypeFactory [kt]
## ComponentTypeFactory *- kt*
**变更记录**

View File

@@ -1,4 +1,4 @@
## ConstructorFinder [class]
## ConstructorFinder *- class*
```kotlin
class ConstructorFinder internal constructor(override val hookInstance: YukiMemberHookCreater.MemberHookCreater?, override val classSet: Class<*>) : BaseFinder()
@@ -18,7 +18,7 @@ class ConstructorFinder internal constructor(override val hookInstance: YukiMemb
可通过指定类型查找指定构造方法或一组构造方法。
### paramCount [field]
### paramCount *- field*
```kotlin
var paramCount: Int
@@ -36,7 +36,7 @@ var paramCount: Int
若参数个数小于零则忽略并使用 `param`
### modifiers [method]
### modifiers *- method*
```kotlin
inline fun modifiers(initiate: ModifierRules.() -> Unit): IndexTypeCondition
@@ -58,7 +58,7 @@ inline fun modifiers(initiate: ModifierRules.() -> Unit): IndexTypeCondition
!> 存在多个 `IndexTypeCondition` 时除了 `order` 只会生效最后一个。
### emptyParam [method]
### emptyParam *- method*
```kotlin
fun emptyParam(): IndexTypeCondition
@@ -72,7 +72,7 @@ fun emptyParam(): IndexTypeCondition
> 设置 `Constructor` 空参数、无参数。
### param [method]
### param *- method*
```kotlin
fun param(vararg paramType: Any): IndexTypeCondition
@@ -94,7 +94,7 @@ fun param(vararg paramType: Any): IndexTypeCondition
!> 存在多个 `IndexTypeCondition` 时除了 `order` 只会生效最后一个。
### paramCount [method]
### paramCount *- method*
```kotlin
fun paramCount(num: Int): IndexTypeCondition
@@ -114,7 +114,7 @@ fun paramCount(num: Int): IndexTypeCondition
!> 存在多个 `IndexTypeCondition` 时除了 `order` 只会生效最后一个。
### paramCount [method]
### paramCount *- method*
```kotlin
fun paramCount(numRange: IntRange): IndexTypeCondition
@@ -132,7 +132,7 @@ fun paramCount(numRange: IntRange): IndexTypeCondition
!> 存在多个 `IndexTypeCondition` 时除了 `order` 只会生效最后一个。
### superClass [method]
### superClass *- method*
```kotlin
fun superClass(isOnlySuperClass: Boolean)
@@ -148,7 +148,7 @@ fun superClass(isOnlySuperClass: Boolean)
!> 若当前 `classSet` 的父类较多可能会耗时API 会自动循环到父类继承是 `Any` 前的最后一个类。
### RemedyPlan [class]
### RemedyPlan *- class*
```kotlin
inner class RemedyPlan internal constructor()
@@ -162,7 +162,7 @@ inner class RemedyPlan internal constructor()
> `Constructor` 重查找实现类,可累计失败次数直到查找成功。
#### constructor [method]
#### constructor *- method*
```kotlin
inline fun constructor(initiate: ConstructorCondition)
@@ -182,7 +182,7 @@ inline fun constructor(initiate: ConstructorCondition)
你可以添加多个备选 `Constructor`,直到成功为止,若最后依然失败,将停止查找并输出错误日志。
#### Result [class]
#### Result *- class*
```kotlin
inner class Result internal constructor()
@@ -196,7 +196,7 @@ inner class Result internal constructor()
> `RemedyPlan` 结果实现类。
##### onFind [method]
##### onFind *- method*
```kotlin
fun onFind(initiate: HashSet<Constructor<*>>.() -> Unit)
@@ -228,7 +228,7 @@ constructor {
}
```
### Result [class]
### Result *- class*
```kotlin
inner class Result internal constructor(internal val isNoSuch: Boolean, internal val throwable: Throwable?) : BaseResult
@@ -246,7 +246,7 @@ inner class Result internal constructor(internal val isNoSuch: Boolean, internal
> `Constructor` 查找结果实现类。
#### result [method]
#### result *- method*
```kotlin
inline fun result(initiate: Result.() -> Unit): Result
@@ -281,7 +281,7 @@ constructor {
}
```
#### get [method]
#### get *- method*
```kotlin
fun get(): Instance
@@ -331,7 +331,7 @@ constructor {
}.get().newInstance<TestClass>("param1", "param2")
```
#### all [method]
#### all *- method*
```kotlin
fun all(): ArrayList<Instance>
@@ -361,7 +361,7 @@ constructor {
}
```
#### give [method]
#### give *- method*
```kotlin
fun give(): Constructor<*>?
@@ -379,7 +379,7 @@ fun give(): Constructor<*>?
在查询条件找不到任何结果的时候将返回 `null`
#### giveAll [method]
#### giveAll *- method*
```kotlin
fun giveAll(): HashSet<Constructor<*>>
@@ -397,7 +397,7 @@ fun giveAll(): HashSet<Constructor<*>>
在查询条件找不到任何结果的时候将返回空的 `HashSet`
#### wait [method]
#### wait *- method*
```kotlin
fun wait(initiate: Instance.() -> Unit)
@@ -417,7 +417,7 @@ fun wait(initiate: Instance.() -> Unit)
!> 若你没有设置 `remedys` 此方法将不会被回调。
#### waitAll [method]
#### waitAll *- method*
```kotlin
fun waitAll(initiate: ArrayList<Instance>.() -> Unit)
@@ -437,7 +437,7 @@ fun waitAll(initiate: ArrayList<Instance>.() -> Unit)
!> 若你没有设置 `remedys` 此方法将不会被回调。
#### remedys [method]
#### remedys *- method*
```kotlin
inline fun remedys(initiate: RemedyPlan.() -> Unit): Result
@@ -476,7 +476,7 @@ constructor {
}
```
#### onNoSuchConstructor [method]
#### onNoSuchConstructor *- method*
```kotlin
inline fun onNoSuchConstructor(result: (Throwable) -> Unit): Result
@@ -496,7 +496,7 @@ inline fun onNoSuchConstructor(result: (Throwable) -> Unit): Result
只会返回第一次的错误信息,不会返回 `RemedyPlan` 的错误信息。
#### ignored [method]
#### ignored *- method*
```kotlin
fun ignored(): Result
@@ -514,7 +514,7 @@ fun ignored(): Result
!> 此时若要监听异常结果,你需要手动实现 `onNoSuchConstructor` 方法。
#### ~~ignoredError [method]~~ <!-- {docsify-ignore} -->
#### ~~ignoredError *- method*~~ <!-- {docsify-ignore} -->
**变更记录**
@@ -524,7 +524,7 @@ fun ignored(): Result
请转移到新方法 `ignored()`
#### Instance [class]
#### Instance *- class*
```kotlin
inner class Instance internal constructor(private val constructor: Constructor<*>?)
@@ -542,7 +542,7 @@ inner class Instance internal constructor(private val constructor: Constructor<*
> `Constructor` 实例处理类。
##### call [method]
##### call *- method*
```kotlin
fun call(vararg param: Any?): Any?
@@ -556,7 +556,7 @@ fun call(vararg param: Any?): Any?
> 执行 `Constructor` 创建目标实例,不指定目标实例类型。
##### newInstance [method]
##### newInstance *- method*
```kotlin
fun <T> newInstance(vararg param: Any?): T?

View File

@@ -1,4 +1,4 @@
## CurrentClass [class]
## CurrentClass *- class*
```kotlin
class CurrentClass internal constructor(internal val classSet: Class<*>, internal val instance: Any)
@@ -16,7 +16,7 @@ class CurrentClass internal constructor(internal val classSet: Class<*>, interna
> 当前实例的类操作对象。
### name [field]
### name *- field*
```kotlin
val name: String
@@ -30,7 +30,7 @@ val name: String
> 获得当前 `classSet` 的 `Class.getName`。
### simpleName [field]
### simpleName *- field*
```kotlin
val simpleName: String
@@ -44,7 +44,7 @@ val simpleName: String
> 获得当前 `classSet` 的 `Class.getSimpleName`。
### superClass [method]
### superClass *- method*
```kotlin
fun superClass(): SuperClass
@@ -58,7 +58,7 @@ fun superClass(): SuperClass
> 调用父类实例。
### field [method]
### field *- method*
```kotlin
inline fun field(initiate: FieldCondition): FieldFinder.Result.Instance
@@ -72,7 +72,7 @@ inline fun field(initiate: FieldCondition): FieldFinder.Result.Instance
> 调用当前实例中的变量。
### method [method]
### method *- method*
```kotlin
inline fun method(initiate: MethodCondition): MethodFinder.Result.Instance
@@ -86,7 +86,7 @@ inline fun method(initiate: MethodCondition): MethodFinder.Result.Instance
> 调用当前实例中的方法。
### SuperClass [class]
### SuperClass *- class*
```kotlin
inner class SuperClass internal constructor()
@@ -100,7 +100,7 @@ inner class SuperClass internal constructor()
> 当前类的父类实例的类操作对象。
#### name [field]
#### name *- field*
```kotlin
val name: String
@@ -114,7 +114,7 @@ val name: String
> 获得当前 `classSet` 中父类的 `Class.getName`。
#### simpleName [field]
#### simpleName *- field*
```kotlin
val simpleName: String
@@ -128,7 +128,7 @@ val simpleName: String
> 获得当前 `classSet` 中父类的 `Class.getSimpleName`。
#### field [method]
#### field *- method*
```kotlin
inline fun field(initiate: FieldCondition): FieldFinder.Result.Instance
@@ -142,7 +142,7 @@ inline fun field(initiate: FieldCondition): FieldFinder.Result.Instance
> 调用父类实例中的变量。
#### method [method]
#### method *- method*
```kotlin
inline fun method(initiate: MethodCondition): MethodFinder.Result.Instance

View File

@@ -1,4 +1,4 @@
## FieldFinder [class]
## FieldFinder *- class*
```kotlin
class FieldFinder internal constructor(override val hookInstance: YukiMemberHookCreater.MemberHookCreater?, override val classSet: Class<*>?) : BaseFinder()
@@ -18,7 +18,7 @@ class FieldFinder internal constructor(override val hookInstance: YukiMemberHook
可通过指定类型查找指定变量或一组变量。
### ~~classSet [field]~~ <!-- {docsify-ignore} -->
### ~~classSet *- field*~~ <!-- {docsify-ignore} -->
**变更记录**
@@ -26,7 +26,7 @@ class FieldFinder internal constructor(override val hookInstance: YukiMemberHook
`v1.0.2` `移除`
### name [field]
### name *- field*
```kotlin
var name: String
@@ -46,7 +46,7 @@ var name: String
!> 若不填写名称则必须存在一个其它条件。
### type [field]
### type *- field*
```kotlin
var type: Any?
@@ -62,7 +62,7 @@ var type: Any?
可不填写类型。
### modifiers [method]
### modifiers *- method*
```kotlin
inline fun modifiers(initiate: ModifierRules.() -> Unit): IndexTypeCondition
@@ -84,7 +84,7 @@ inline fun modifiers(initiate: ModifierRules.() -> Unit): IndexTypeCondition
!> 存在多个 `IndexTypeCondition` 时除了 `order` 只会生效最后一个。
### order [method]
### order *- method*
```kotlin
fun order(): IndexTypeCondition
@@ -98,7 +98,7 @@ fun order(): IndexTypeCondition
> 顺序筛选字节码的下标。
### name [method]
### name *- method*
```kotlin
fun name(value: String): IndexTypeCondition
@@ -116,7 +116,7 @@ fun name(value: String): IndexTypeCondition
!> 存在多个 `IndexTypeCondition` 时除了 `order` 只会生效最后一个。
### name [method]
### name *- method*
```kotlin
inline fun name(initiate: NameConditions.() -> Unit): IndexTypeCondition
@@ -134,7 +134,7 @@ inline fun name(initiate: NameConditions.() -> Unit): IndexTypeCondition
!> 存在多个 `IndexTypeCondition` 时除了 `order` 只会生效最后一个。
### type [method]
### type *- method*
```kotlin
fun type(value: Any): IndexTypeCondition
@@ -152,7 +152,7 @@ fun type(value: Any): IndexTypeCondition
!> 存在多个 `IndexTypeCondition` 时除了 `order` 只会生效最后一个。
### superClass [method]
### superClass *- method*
```kotlin
fun superClass(isOnlySuperClass: Boolean)
@@ -168,7 +168,7 @@ fun superClass(isOnlySuperClass: Boolean)
!> 若当前 `classSet` 的父类较多可能会耗时API 会自动循环到父类继承是 `Any` 前的最后一个类。
### RemedyPlan [class]
### RemedyPlan *- class*
```kotlin
inner class RemedyPlan internal constructor()
@@ -182,7 +182,7 @@ inner class RemedyPlan internal constructor()
> `Field` 重查找实现类,可累计失败次数直到查找成功。
#### field [method]
#### field *- method*
```kotlin
inline fun field(initiate: FieldCondition): Result
@@ -198,7 +198,7 @@ inline fun field(initiate: FieldCondition): Result
你可以添加多个备选 `Field`,直到成功为止,若最后依然失败,将停止查找并输出错误日志。
#### Result [class]
#### Result *- class*
```kotlin
inner class Result internal constructor()
@@ -212,7 +212,7 @@ inner class Result internal constructor()
> `RemedyPlan` 结果实现类。
##### onFind [method]
##### onFind *- method*
```kotlin
fun onFind(initiate: HashSet<Field>.() -> Unit)
@@ -240,7 +240,7 @@ field {
}
```
### Result [class]
### Result *- class*
```kotlin
inner class Result internal constructor(internal val isNoSuch: Boolean, private val throwable: Throwable?) : BaseResult
@@ -258,7 +258,7 @@ inner class Result internal constructor(internal val isNoSuch: Boolean, private
> `Field` 查找结果实现类。
#### result [method]
#### result *- method*
```kotlin
inline fun result(initiate: Result.() -> Unit): Result
@@ -297,7 +297,7 @@ field {
}
```
#### get [method]
#### get *- method*
```kotlin
fun get(instance: Any?): Instance
@@ -335,7 +335,7 @@ field {
}.get().set("something")
```
#### all [method]
#### all *- method*
```kotlin
fun all(instance: Any?): ArrayList<Instance>
@@ -365,7 +365,7 @@ field {
}
```
#### give [method]
#### give *- method*
```kotlin
fun give(): Field?
@@ -383,7 +383,7 @@ fun give(): Field?
在查询条件找不到任何结果的时候将返回 `null`
#### giveAll [method]
#### giveAll *- method*
```kotlin
fun giveAll(): HashSet<Field>
@@ -401,7 +401,7 @@ fun giveAll(): HashSet<Field>
在查询条件找不到任何结果的时候将返回空的 `HashSet`
#### wait [method]
#### wait *- method*
```kotlin
fun wait(instance: Any?, initiate: Instance.() -> Unit)
@@ -421,7 +421,7 @@ fun wait(instance: Any?, initiate: Instance.() -> Unit)
!> 若你没有设置 `remedys` 此方法将不会被回调。
#### waitAll [method]
#### waitAll *- method*
```kotlin
fun waitAll(instance: Any?, initiate: ArrayList<Instance>.() -> Unit)
@@ -441,7 +441,7 @@ fun waitAll(instance: Any?, initiate: ArrayList<Instance>.() -> Unit)
!> 若你没有设置 `remedys` 此方法将不会被回调。
#### remedys [method]
#### remedys *- method*
```kotlin
inline fun remedys(initiate: RemedyPlan.() -> Unit): Result
@@ -476,7 +476,7 @@ field {
}
```
#### onNoSuchField [method]
#### onNoSuchField *- method*
```kotlin
fun onNoSuchField(result: (Throwable) -> Unit): Result
@@ -490,7 +490,7 @@ fun onNoSuchField(result: (Throwable) -> Unit): Result
> 监听找不到 `Field` 时。
#### ignored [method]
#### ignored *- method*
```kotlin
fun ignored(): Result
@@ -508,7 +508,7 @@ fun ignored(): Result
!> 此时若要监听异常结果,你需要手动实现 `onNoSuchField` 方法。
#### ~~ignoredError [method]~~ <!-- {docsify-ignore} -->
#### ~~ignoredError *- method*~~ <!-- {docsify-ignore} -->
**变更记录**
@@ -518,7 +518,7 @@ fun ignored(): Result
请转移到新方法 `ignored()`
#### Instance [class]
#### Instance *- class*
```kotlin
inner class Instance internal constructor(private val instance: Any?, private val field: Field?)
@@ -538,7 +538,7 @@ inner class Instance internal constructor(private val instance: Any?, private va
> `Field` 实例变量处理类。
##### ~~self [field]~~ <!-- {docsify-ignore} -->
##### ~~self *- field*~~ <!-- {docsify-ignore} -->
**变更记录**
@@ -548,7 +548,7 @@ inner class Instance internal constructor(private val instance: Any?, private va
请直接使用 `any` 方法得到 `Field` 自身的实例化对象
##### current [method]
##### current *- method*
```kotlin
fun current(): CurrentClass?
@@ -566,7 +566,7 @@ inline fun current(initiate: CurrentClass.() -> Unit): Any?
> 获得当前 `Field` 自身 `self` 实例的类操作对象。
##### cast [method]
##### cast *- method*
```kotlin
fun <T> cast(): T?
@@ -586,7 +586,7 @@ fun <T> cast(): T?
> 得到当前 `Field` 实例。
##### byte [method]
##### byte *- method*
```kotlin
fun byte(): Byte?
@@ -600,7 +600,7 @@ fun byte(): Byte?
> 得到当前 `Field` Byte 实例。
##### int [method]
##### int *- method*
```kotlin
fun int(): Int
@@ -620,7 +620,7 @@ fun int(): Int
> 得到当前 `Field` Int 实例。
##### long [method]
##### long *- method*
```kotlin
fun long(): Long
@@ -640,7 +640,7 @@ fun long(): Long
> 得到当前 `Field` Long 实例。
##### short [method]
##### short *- method*
```kotlin
fun short(): Short
@@ -659,7 +659,7 @@ fun short(): Short
> 得到当前 `Field` Short 实例。
##### double [method]
##### double *- method*
```kotlin
fun double(): Double
@@ -679,7 +679,7 @@ fun double(): Double
> 得到当前 `Field` Double 实例。
##### float [method]
##### float *- method*
```kotlin
fun float(): Float
@@ -698,7 +698,7 @@ fun float(): Float
> 得到当前 `Field` Float 实例。
##### string [method]
##### string *- method*
```kotlin
fun string(): String
@@ -718,7 +718,7 @@ fun string(): String
> 得到当前 `Field` String 实例。
##### char [method]
##### char *- method*
```kotlin
fun char(): Char
@@ -732,7 +732,7 @@ fun char(): Char
> 得到当前 `Field` Char 实例。
##### boolean [method]
##### boolean *- method*
```kotlin
fun boolean(): Boolean
@@ -752,7 +752,7 @@ fun boolean(): Boolean
> 得到当前 `Field` Boolean 实例。
##### any [method]
##### any *- method*
```kotlin
fun any(): Any?
@@ -771,7 +771,7 @@ fun any(): Any?
> 得到当前 `Field` Any 实例。
##### array [method]
##### array *- method*
```kotlin
inline fun <reified T> array(): Array<T>
@@ -785,7 +785,7 @@ inline fun <reified T> array(): Array<T>
> 得到当前 `Field` Array 实例。
##### list [method]
##### list *- method*
```kotlin
inline fun <reified T> list(): List<T>
@@ -799,7 +799,7 @@ inline fun <reified T> list(): List<T>
> 得到当前 `Field` List 实例。
##### set [method]
##### set *- method*
```kotlin
fun set(any: Any?)
@@ -813,7 +813,7 @@ fun set(any: Any?)
> 设置当前 `Field` 实例。
##### setTrue [method]
##### setTrue *- method*
```kotlin
fun setTrue()
@@ -828,7 +828,7 @@ fun setTrue()
!> 请确保实例对象类型为 `Boolean`
##### setFalse [method]
##### setFalse *- method*
```kotlin
fun setFalse()
@@ -844,7 +844,7 @@ fun setFalse()
!> 请确保实例对象类型为 `Boolean`
##### setNull [method]
##### setNull *- method*
```kotlin
fun setNull()

View File

@@ -1,4 +1,4 @@
## GraphicsTypeFactory [kt]
## GraphicsTypeFactory *- kt*
**变更记录**

View File

@@ -1,4 +1,4 @@
## HookClass [class]
## HookClass *- class*
```kotlin
class HookClass internal constructor(internal var instance: Class<*>?, internal var name: String, internal var throwable: Throwable?)

View File

@@ -1,4 +1,4 @@
## HookParam [class]
## HookParam *- class*
```kotlin
class HookParam internal constructor(private val createrInstance: YukiMemberHookCreater, private var wrapper: HookParamWrapper?)
@@ -12,7 +12,7 @@ class HookParam internal constructor(private val createrInstance: YukiMemberHook
> Hook 方法、构造方法的目标对象实现类。
### args [field]
### args *- field*
```kotlin
val args: Array<Any?>
@@ -26,7 +26,7 @@ val args: Array<Any?>
> 获取当前 Hook 对象 `member` 或 `constructor` 的参数对象数组。
### ~~firstArgs [field]~~ <!-- {docsify-ignore} -->
### ~~firstArgs *- field*~~ <!-- {docsify-ignore} -->
**变更记录**
@@ -36,7 +36,7 @@ val args: Array<Any?>
请使用 `args(index = 0)``args().first()`
### ~~lastArgs [field]~~ <!-- {docsify-ignore} -->
### ~~lastArgs *- field*~~ <!-- {docsify-ignore} -->
**变更记录**
@@ -46,7 +46,7 @@ val args: Array<Any?>
请使用 `args().last()`
### instance [field]
### instance *- field*
```kotlin
val instance: Any
@@ -62,7 +62,7 @@ val instance: Any
!> 如果你当前 Hook 的对象是一个静态,那么它将不存在实例的对象。
### instanceClass [field]
### instanceClass *- field*
```kotlin
val instanceClass: Class<*>
@@ -76,7 +76,7 @@ val instanceClass: Class<*>
> 获取当前 Hook 实例的类对象。
### member [field]
### member *- field*
```kotlin
val member: Member
@@ -92,7 +92,7 @@ val member: Member
在不确定 `Member` 类型为 `Method``Constructor` 时可以使用此方法。
### method [field]
### method *- field*
```kotlin
val method: Method
@@ -106,7 +106,7 @@ val method: Method
> 获取当前 Hook 对象的方法。
### constructor [field]
### constructor *- field*
```kotlin
val constructor: Constructor
@@ -120,7 +120,7 @@ val constructor: Constructor
> 获取当前 Hook 对象的构造方法。
### result [field]
### result *- field*
```kotlin
var result: Any?
@@ -134,7 +134,7 @@ var result: Any?
> 获取、设置当前 Hook 对象的 `method` 或 `constructor` 的返回值。
### hasThrowable [field]
### hasThrowable *- field*
```kotlin
val hasThrowable: Boolean
@@ -148,7 +148,7 @@ val hasThrowable: Boolean
> 判断是否存在设置过的方法调用抛出异常。
### throwable [field]
### throwable *- field*
```kotlin
val throwable: Throwable?
@@ -162,7 +162,7 @@ val throwable: Throwable?
> 获取设置的方法调用抛出异常。
### throwToApp [method]
### Throwable.throwToApp *- i-ext-method*
```kotlin
fun Throwable.throwToApp()
@@ -205,7 +205,7 @@ injectMember {
!> 向 Hook APP 抛出异常<u>**会对其暴露被 Hook 的事实**</u>,是不安全的,容易被检测,请按实际场景合理使用。
### result [method]
### result *- method*
```kotlin
inline fun <reified T> result(): T?
@@ -219,7 +219,7 @@ inline fun <reified T> result(): T?
> 获取当前 Hook 对象的 `method` 或 `constructor` 的返回值 `T`。
### ~~firstArgs [method]~~ <!-- {docsify-ignore} -->
### ~~firstArgs *- method*~~ <!-- {docsify-ignore} -->
**变更记录**
@@ -227,7 +227,7 @@ inline fun <reified T> result(): T?
`v1.0.75` `移除`
### ~~lastArgs [method]~~ <!-- {docsify-ignore} -->
### ~~lastArgs *- method*~~ <!-- {docsify-ignore} -->
**变更记录**
@@ -235,7 +235,7 @@ inline fun <reified T> result(): T?
`v1.0.75` `移除`
### instance [method]
### instance *- method*
```kotlin
inline fun <reified T> instance(): T
@@ -259,7 +259,7 @@ inline fun <reified T> instance(): T
instance<Activity>().finish()
```
### args [method]
### args *- method*
```kotlin
fun args(): ArgsIndexCondition
@@ -273,7 +273,7 @@ fun args(): ArgsIndexCondition
> 获取当前 Hook 对象的 `method` or `constructor` 的参数数组下标实例化类。
### args [method]
### args *- method*
```kotlin
fun args(index: Int): ArgsModifyer
@@ -349,7 +349,7 @@ args(index = 1).setTrue()
args(index = 1).setFalse()
```
### invokeOriginal [method]
### Member.invokeOriginal *- i-ext-method*
```kotlin
fun <T> Member.invokeOriginal(vararg args: Any?): Any?
@@ -373,7 +373,7 @@ fun <T> Member.invokeOriginal(vararg args: Any?): Any?
member.invokeOriginal("test value")
```
### resultTrue [method]
### resultTrue *- method*
```kotlin
fun resultTrue()
@@ -389,7 +389,7 @@ fun resultTrue()
!> 请确保 `result` 类型为 `Boolean`
### resultFalse [method]
### resultFalse *- method*
```kotlin
fun resultFalse()
@@ -405,7 +405,7 @@ fun resultFalse()
!> 请确保 `result` 类型为 `Boolean`
### resultNull [method]
### resultNull *- method*
```kotlin
fun resultNull()
@@ -419,7 +419,7 @@ fun resultNull()
!> 此方法将强制设置 Hook 对象方法的 `result``null`
### ArgsIndexCondition [class]
### ArgsIndexCondition *- class*
```kotlin
inner class ArgsIndexCondition internal constructor()
@@ -433,7 +433,7 @@ inner class ArgsIndexCondition internal constructor()
> 对方法参数的数组下标进行实例化类。
#### first [method]
#### first *- method*
```kotlin
fun first(): ArgsModifyer
@@ -447,7 +447,7 @@ fun first(): ArgsModifyer
> 获取当前 Hook 对象的 `method` or `constructor` 的参数数组第一位。
#### last [method]
#### last *- method*
```kotlin
fun last(): ArgsModifyer
@@ -461,7 +461,7 @@ fun last(): ArgsModifyer
> 获取当前 Hook 对象的 `method` or `constructor` 的参数数组最后一位。
### ArgsModifyer [class]
### ArgsModifyer *- class*
```kotlin
inner class ArgsModifyer internal constructor(private val index: Int)
@@ -475,7 +475,7 @@ inner class ArgsModifyer internal constructor(private val index: Int)
> 对方法参数的修改进行实例化类。
#### cast [method]
#### cast *- method*
```kotlin
fun <T> cast(): T?
@@ -493,7 +493,7 @@ fun <T> cast(): T?
> 得到方法参数的实例对象 `T`。
#### byte [method]
#### byte *- method*
```kotlin
fun byte(): Byte?
@@ -507,7 +507,7 @@ fun byte(): Byte?
> 得到方法参数的实例对象 Byte。
#### int [method]
#### int *- method*
```kotlin
fun int(): Int
@@ -525,7 +525,7 @@ fun int(): Int
> 得到方法参数的实例对象 Int。
#### long [method]
#### long *- method*
```kotlin
fun long(): Long
@@ -543,7 +543,7 @@ fun long(): Long
> 得到方法参数的实例对象 Long。
#### short [method]
#### short *- method*
```kotlin
fun short(): Short
@@ -561,7 +561,7 @@ fun short(): Short
> 得到方法参数的实例对象 Short。
#### double [method]
#### double *- method*
```kotlin
fun double(): Double
@@ -579,7 +579,7 @@ fun double(): Double
> 得到方法参数的实例对象 Double。
#### float [method]
#### float *- method*
```kotlin
fun float(): Float
@@ -597,7 +597,7 @@ fun float(): Float
> 得到方法参数的实例对象 Float。
#### string [method]
#### string *- method*
```kotlin
fun string(): String
@@ -615,7 +615,7 @@ fun string(): String
> 得到方法参数的实例对象 String。
#### char [method]
#### char *- method*
```kotlin
fun char(): Char
@@ -629,7 +629,7 @@ fun char(): Char
> 得到方法参数的实例对象 Char。
#### boolean [method]
#### boolean *- method*
```kotlin
fun boolean(): Boolean
@@ -647,7 +647,7 @@ fun boolean(): Boolean
> 得到方法参数的实例对象 Boolean。
#### any [method]
#### any *- method*
```kotlin
fun any(): Any?
@@ -661,7 +661,7 @@ fun any(): Any?
> 得到方法参数的实例对象 Any。
#### array [method]
#### array *- method*
```kotlin
inline fun <reified T> array(): Array<T>
@@ -675,7 +675,7 @@ inline fun <reified T> array(): Array<T>
> 得到方法参数的实例对象 Array。
#### list [method]
#### list *- method*
```kotlin
inline fun <reified T> list(): List<T>
```
@@ -688,7 +688,7 @@ inline fun <reified T> list(): List<T>
> 得到方法参数的实例对象 List。
#### set [method]
#### set *- method*
```kotlin
fun <T> set(any: T?)
@@ -702,7 +702,7 @@ fun <T> set(any: T?)
> 设置方法参数的实例对象。
#### setNull [method]
#### setNull *- method*
```kotlin
fun setNull()
@@ -716,7 +716,7 @@ fun setNull()
> 设置方法参数的实例对象为 `null`。
#### setTrue [method]
#### setTrue *- method*
```kotlin
fun setTrue()
@@ -732,7 +732,7 @@ fun setTrue()
!> 请确保目标对象的类型是 `Boolean`
#### setFalse [method]
#### setFalse *- method*
```kotlin
fun setFalse()

View File

@@ -1,4 +1,4 @@
## HookResources [class]
## HookResources *- class*
```kotlin
class HookResources internal constructor(var instance: YukiResources?)

View File

@@ -1,4 +1,4 @@
## IYukiHookXposedInit [interface]
## IYukiHookXposedInit *- interface*
```kotlin
interface IYukiHookXposedInit
@@ -18,7 +18,7 @@ interface IYukiHookXposedInit
> YukiHookAPI 的 Xposed 装载 API 调用接口。
### onInit [method]
### onInit *- method*
```kotlin
fun onInit()
@@ -36,7 +36,7 @@ fun onInit()
此方法可选,你也可以选择不对 `YukiHookAPI.Configs` 进行配置。
### onHook [method]
### onHook *- method*
```kotlin
fun onHook()
@@ -50,7 +50,7 @@ fun onHook()
> Xposed API 的模块装载调用入口方法。
### onXposedEvent [method]
### onXposedEvent *- method*
```kotlin
fun onXposedEvent()
@@ -78,7 +78,7 @@ fun onXposedEvent()
!> 此接口仅供监听和实现原生 Xposed API 的功能,请不要在这里操作 `YukiHookAPI`
## ~~YukiHookXposedInitProxy [interface]~~ <!-- {docsify-ignore} -->
## ~~YukiHookXposedInitProxy *- interface*~~ <!-- {docsify-ignore} -->
**变更记录**

View File

@@ -1,4 +1,4 @@
## InjectYukiHookWithXposed [annotation]
## InjectYukiHookWithXposed *- annotation*
```kotlin
annotation class InjectYukiHookWithXposed(

View File

@@ -1,4 +1,4 @@
## LoggerFactory [kt]
## LoggerFactory *- kt*
**变更记录**
@@ -8,7 +8,7 @@
> 这是 `YukiHookAPI` 的日志封装类,可实现同时向 `Logcat` 和 `XposedBridge.log` 打印日志的功能。
### LoggerType [class]
### LoggerType *- class*
```kotlin
enum class LoggerType
@@ -24,7 +24,7 @@ enum class LoggerType
决定于模块与 (Xposed) 宿主环境使用的打印方式。
#### LOGD [enum]
#### LOGD *- enum*
```kotlin
LOGD
@@ -38,7 +38,7 @@ LOGD
> 仅使用 `android.util.Log`。
#### XPOSEDBRIDGE [enum]
#### XPOSEDBRIDGE *- enum*
```kotlin
XPOSEDBRIDGE
@@ -54,7 +54,7 @@ XPOSEDBRIDGE
!> 只能在 (Xposed) 宿主环境中使用,模块环境将不生效。
#### SCOPE [enum]
#### SCOPE *- enum*
```kotlin
SCOPE
@@ -72,7 +72,7 @@ SCOPE
模块环境仅使用 `LOGD`
#### BOTH [enum]
#### BOTH *- enum*
```kotlin
BOTH
@@ -90,7 +90,7 @@ BOTH
模块环境仅使用 `LOGD`
### loggerD [method]
### loggerD *- method*
```kotlin
fun loggerD(tag: String, msg: String, type: LoggerType)
@@ -110,7 +110,7 @@ fun loggerD(tag: String, msg: String, type: LoggerType)
`tag` 的默认参数为 `YukiHookAPI.Configs.debugTag`,你可以进行自定义。
### loggerI [method]
### loggerI *- method*
```kotlin
fun loggerI(tag: String, msg: String, type: LoggerType)
@@ -130,7 +130,7 @@ fun loggerI(tag: String, msg: String, type: LoggerType)
`tag` 的默认参数为 `YukiHookAPI.Configs.debugTag`,你可以进行自定义。
### loggerW [method]
### loggerW *- method*
```kotlin
fun loggerW(tag: String, msg: String, type: LoggerType)
@@ -150,7 +150,7 @@ fun loggerW(tag: String, msg: String, type: LoggerType)
`tag` 的默认参数为 `YukiHookAPI.Configs.debugTag`,你可以进行自定义。
### loggerE [method]
### loggerE *- method*
```kotlin
fun loggerE(tag: String, msg: String, e: Throwable?, type: LoggerType)

View File

@@ -1,4 +1,4 @@
## MethodFinder [class]
## MethodFinder *- class*
```kotlin
class MethodFinder internal constructor(override val hookInstance: YukiMemberHookCreater.MemberHookCreater?, override val classSet: Class<*>) : BaseFinder()
@@ -18,7 +18,7 @@ class MethodFinder internal constructor(override val hookInstance: YukiMemberHoo
可通过指定类型查找指定方法或一组方法。
### name [field]
### name *- field*
```kotlin
var name: String
@@ -38,7 +38,7 @@ var name: String
!> 若不填写名称则必须存在一个其它条件。
### paramCount [field]
### paramCount *- field*
```kotlin
var paramCount: Int
@@ -56,7 +56,7 @@ var paramCount: Int
若参数个数小于零则忽略并使用 `param`
### returnType [field]
### returnType *- field*
```kotlin
var returnType: Any?
@@ -70,7 +70,7 @@ var returnType: Any?
> 设置 `Method` 返回值,可不填写返回值。
### modifiers [method]
### modifiers *- method*
```kotlin
inline fun modifiers(initiate: ModifierRules.() -> Unit): IndexTypeCondition
@@ -92,7 +92,7 @@ inline fun modifiers(initiate: ModifierRules.() -> Unit): IndexTypeCondition
!> 存在多个 `IndexTypeCondition` 时除了 `order` 只会生效最后一个。
### emptyParam [method]
### emptyParam *- method*
```kotlin
fun emptyParam(): IndexTypeCondition
@@ -106,7 +106,7 @@ fun emptyParam(): IndexTypeCondition
> 设置 `Method` 空参数、无参数。
### param [method]
### param *- method*
```kotlin
fun param(vararg paramType: Any): IndexTypeCondition
@@ -128,7 +128,7 @@ fun param(vararg paramType: Any): IndexTypeCondition
!> 存在多个 `IndexTypeCondition` 时除了 `order` 只会生效最后一个。
### order [method]
### order *- method*
```kotlin
fun order(): IndexTypeCondition
@@ -142,7 +142,7 @@ fun order(): IndexTypeCondition
> 顺序筛选字节码的下标。
### name [method]
### name *- method*
```kotlin
fun name(value: String): IndexTypeCondition
@@ -160,7 +160,7 @@ fun name(value: String): IndexTypeCondition
!> 存在多个 `IndexTypeCondition` 时除了 `order` 只会生效最后一个。
### name [method]
### name *- method*
```kotlin
inline fun name(initiate: NameConditions.() -> Unit): IndexTypeCondition
@@ -178,7 +178,7 @@ inline fun name(initiate: NameConditions.() -> Unit): IndexTypeCondition
!> 存在多个 `IndexTypeCondition` 时除了 `order` 只会生效最后一个。
### paramCount [method]
### paramCount *- method*
```kotlin
fun paramCount(num: Int): IndexTypeCondition
@@ -198,7 +198,7 @@ fun paramCount(num: Int): IndexTypeCondition
!> 存在多个 `IndexTypeCondition` 时除了 `order` 只会生效最后一个。
### paramCount [method]
### paramCount *- method*
```kotlin
fun paramCount(numRange: IntRange): IndexTypeCondition
@@ -216,7 +216,7 @@ fun paramCount(numRange: IntRange): IndexTypeCondition
!> 存在多个 `IndexTypeCondition` 时除了 `order` 只会生效最后一个。
### returnType [method]
### returnType *- method*
```kotlin
fun returnType(value: Any): IndexTypeCondition
@@ -234,7 +234,7 @@ fun returnType(value: Any): IndexTypeCondition
!> 存在多个 `IndexTypeCondition` 时除了 `order` 只会生效最后一个。
### superClass [method]
### superClass *- method*
```kotlin
fun superClass(isOnlySuperClass: Boolean)
@@ -250,7 +250,7 @@ fun superClass(isOnlySuperClass: Boolean)
!> 若当前 `classSet` 的父类较多可能会耗时API 会自动循环到父类继承是 `Any` 前的最后一个类。
### RemedyPlan [class]
### RemedyPlan *- class*
```kotlin
inner class RemedyPlan internal constructor()
@@ -264,7 +264,7 @@ inner class RemedyPlan internal constructor()
> `Method` 重查找实现类,可累计失败次数直到查找成功。
#### method [method]
#### method *- method*
```kotlin
inline fun method(initiate: MethodCondition): Result
@@ -284,7 +284,7 @@ inline fun method(initiate: MethodCondition): Result
你可以添加多个备选 `Method`,直到成功为止,若最后依然失败,将停止查找并输出错误日志。
#### Result [class]
#### Result *- class*
```kotlin
inner class Result internal constructor()
@@ -298,7 +298,7 @@ inner class Result internal constructor()
> `RemedyPlan` 结果实现类。
##### onFind [method]
##### onFind *- method*
```kotlin
fun onFind(initiate: HashSet<Method>.() -> Unit)
@@ -330,7 +330,7 @@ method {
}
```
### Result [class]
### Result *- class*
```kotlin
inner class Result internal constructor(internal val isNoSuch: Boolean, private val throwable: Throwable?) : BaseResult
@@ -348,7 +348,7 @@ inner class Result internal constructor(internal val isNoSuch: Boolean, private
> `Method` 查找结果实现类。
#### result [method]
#### result *- method*
```kotlin
inline fun result(initiate: Result.() -> Unit): Result
@@ -383,7 +383,7 @@ method {
}
```
#### get [method]
#### get *- method*
```kotlin
fun get(instance: Any?): Instance
@@ -423,7 +423,7 @@ method {
}.get().call()
```
#### all [method]
#### all *- method*
```kotlin
fun all(instance: Any?): ArrayList<Instance>
@@ -453,7 +453,7 @@ method {
}
```
#### give [method]
#### give *- method*
```kotlin
fun give(): Method?
@@ -471,7 +471,7 @@ fun give(): Method?
在查询条件找不到任何结果的时候将返回 `null`
#### giveAll [method]
#### giveAll *- method*
```kotlin
fun giveAll(): HashSet<Method>
@@ -489,7 +489,7 @@ fun giveAll(): HashSet<Method>
在查询条件找不到任何结果的时候将返回空的 `HashSet`
#### wait [method]
#### wait *- method*
```kotlin
fun wait(instance: Any?, initiate: Instance.() -> Unit)
@@ -509,7 +509,7 @@ fun wait(instance: Any?, initiate: Instance.() -> Unit)
!> 若你没有设置 `remedys` 此方法将不会被回调。
#### waitAll [method]
#### waitAll *- method*
```kotlin
fun waitAll(instance: Any?, initiate: ArrayList<Instance>.() -> Unit)
@@ -529,7 +529,7 @@ fun waitAll(instance: Any?, initiate: ArrayList<Instance>.() -> Unit)
!> 若你没有设置 `remedys` 此方法将不会被回调。
#### remedys [method]
#### remedys *- method*
```kotlin
inline fun remedys(initiate: RemedyPlan.() -> Unit): Result
@@ -568,7 +568,7 @@ method {
}
```
#### onNoSuchMethod [method]
#### onNoSuchMethod *- method*
```kotlin
inline fun onNoSuchMethod(result: (Throwable) -> Unit): Result
@@ -588,7 +588,7 @@ inline fun onNoSuchMethod(result: (Throwable) -> Unit): Result
只会返回第一次的错误信息,不会返回 `RemedyPlan` 的错误信息。
#### ignored [method]
#### ignored *- method*
```kotlin
fun ignored(): Result
@@ -606,7 +606,7 @@ fun ignored(): Result
!> 此时若要监听异常结果,你需要手动实现 `onNoSuchMethod` 方法。
#### ~~ignoredError [method]~~ <!-- {docsify-ignore} -->
#### ~~ignoredError *- method*~~ <!-- {docsify-ignore} -->
**变更记录**
@@ -616,7 +616,7 @@ fun ignored(): Result
请转移到新方法 `ignored()`
#### Instance [class]
#### Instance *- class*
```kotlin
inner class Instance internal constructor(private val instance: Any?, private val method: Method?)
@@ -634,7 +634,7 @@ inner class Instance internal constructor(private val instance: Any?, private va
> `Method` 实例处理类。
##### original [method]
##### original *- method*
```kotlin
fun original(): Instance
@@ -652,7 +652,7 @@ fun original(): Instance
!> 你只能在 (Xposed) 宿主环境中使用此功能。
##### call [method]
##### call *- method*
```kotlin
fun call(vararg param: Any?): Any?
@@ -666,7 +666,7 @@ fun call(vararg param: Any?): Any?
> 执行方法,不指定返回值类型。
##### invoke [method]
##### invoke *- method*
```kotlin
fun <T> invoke(vararg param: Any?): T?
@@ -680,7 +680,7 @@ fun <T> invoke(vararg param: Any?): T?
> 执行方法,指定 `T` 返回值类型。
##### byte [method]
##### byte *- method*
```kotlin
fun byte(vararg param: Any?): Byte?
@@ -694,7 +694,7 @@ fun byte(vararg param: Any?): Byte?
> 执行方法,指定 Byte 返回值类型。
##### int [method]
##### int *- method*
```kotlin
fun int(vararg param: Any?): Int
@@ -712,7 +712,7 @@ fun int(vararg param: Any?): Int
> 执行方法,指定 Int 返回值类型。
##### long [method]
##### long *- method*
```kotlin
fun long(vararg param: Any?): Long
@@ -730,7 +730,7 @@ fun long(vararg param: Any?): Long
> 执行方法,指定 Long 返回值类型。
##### short [method]
##### short *- method*
```kotlin
fun short(vararg param: Any?): Short
@@ -748,7 +748,7 @@ fun short(vararg param: Any?): Short
> 执行方法,指定 Short 返回值类型。
##### double [method]
##### double *- method*
```kotlin
fun double(vararg param: Any?): Double
@@ -766,7 +766,7 @@ fun double(vararg param: Any?): Double
> 执行方法,指定 Double 返回值类型。
##### float [method]
##### float *- method*
```kotlin
fun float(vararg param: Any?): Float
@@ -784,7 +784,7 @@ fun float(vararg param: Any?): Float
> 执行方法,指定 Float 返回值类型。
##### string [method]
##### string *- method*
```kotlin
fun string(vararg param: Any?): String
@@ -802,7 +802,7 @@ fun string(vararg param: Any?): String
> 执行方法,指定 String 返回值类型。
##### char [method]
##### char *- method*
```kotlin
fun char(vararg param: Any?): Char
@@ -816,7 +816,7 @@ fun char(vararg param: Any?): Char
> 执行方法,指定 Char 返回值类型。
##### boolean [method]
##### boolean *- method*
```kotlin
fun boolean(vararg param: Any?): Boolean
@@ -834,7 +834,7 @@ fun boolean(vararg param: Any?): Boolean
> 执行方法,指定 Boolean 返回值类型。
#### array [method]
#### array *- method*
```kotlin
inline fun <reified T> array(vararg param: Any?): Array<T>
@@ -848,7 +848,7 @@ inline fun <reified T> array(vararg param: Any?): Array<T>
> 执行方法,指定 Array 返回值类型。
#### list [method]
#### list *- method*
```kotlin
inline fun <reified T> list(vararg param: Any?): List<T>

View File

@@ -1,4 +1,4 @@
## ModifierRules [class]
## ModifierRules *- class*
```kotlin
class ModifierRules internal constructor()
@@ -14,7 +14,7 @@ class ModifierRules internal constructor()
可对 R8 混淆后的 `Member` 进行更加详细的定位。
### ~~asPublic [method]~~ <!-- {docsify-ignore} -->
### ~~asPublic *- method*~~ <!-- {docsify-ignore} -->
**变更记录**
@@ -24,7 +24,7 @@ class ModifierRules internal constructor()
请将开头的 `as` 修改为 `is`
### ~~asPrivate [method]~~ <!-- {docsify-ignore} -->
### ~~asPrivate *- method*~~ <!-- {docsify-ignore} -->
**变更记录**
@@ -34,7 +34,7 @@ class ModifierRules internal constructor()
请将开头的 `as` 修改为 `is`
### ~~asProtected [method]~~ <!-- {docsify-ignore} -->
### ~~asProtected *- method*~~ <!-- {docsify-ignore} -->
**变更记录**
@@ -44,7 +44,7 @@ class ModifierRules internal constructor()
请将开头的 `as` 修改为 `is`
### ~~asStatic [method]~~ <!-- {docsify-ignore} -->
### ~~asStatic *- method*~~ <!-- {docsify-ignore} -->
**变更记录**
@@ -54,7 +54,7 @@ class ModifierRules internal constructor()
请将开头的 `as` 修改为 `is`
### ~~asFinal [method]~~ <!-- {docsify-ignore} -->
### ~~asFinal *- method*~~ <!-- {docsify-ignore} -->
**变更记录**
@@ -64,7 +64,7 @@ class ModifierRules internal constructor()
请将开头的 `as` 修改为 `is`
### ~~asSynchronized [method]~~ <!-- {docsify-ignore} -->
### ~~asSynchronized *- method*~~ <!-- {docsify-ignore} -->
**变更记录**
@@ -74,7 +74,7 @@ class ModifierRules internal constructor()
请将开头的 `as` 修改为 `is`
### ~~asVolatile [method]~~ <!-- {docsify-ignore} -->
### ~~asVolatile *- method*~~ <!-- {docsify-ignore} -->
**变更记录**
@@ -84,7 +84,7 @@ class ModifierRules internal constructor()
请将开头的 `as` 修改为 `is`
### ~~asTransient [method]~~ <!-- {docsify-ignore} -->
### ~~asTransient *- method*~~ <!-- {docsify-ignore} -->
**变更记录**
@@ -94,7 +94,7 @@ class ModifierRules internal constructor()
请将开头的 `as` 修改为 `is`
### ~~asNative [method]~~ <!-- {docsify-ignore} -->
### ~~asNative *- method*~~ <!-- {docsify-ignore} -->
**变更记录**
@@ -104,7 +104,7 @@ class ModifierRules internal constructor()
请将开头的 `as` 修改为 `is`
### ~~asInterface [method]~~ <!-- {docsify-ignore} -->
### ~~asInterface *- method*~~ <!-- {docsify-ignore} -->
**变更记录**
@@ -114,7 +114,7 @@ class ModifierRules internal constructor()
请将开头的 `as` 修改为 `is`
### ~~asAbstract [method]~~ <!-- {docsify-ignore} -->
### ~~asAbstract *- method*~~ <!-- {docsify-ignore} -->
**变更记录**
@@ -124,7 +124,7 @@ class ModifierRules internal constructor()
请将开头的 `as` 修改为 `is`
### ~~asStrict [method]~~ <!-- {docsify-ignore} -->
### ~~asStrict *- method*~~ <!-- {docsify-ignore} -->
**变更记录**
@@ -134,7 +134,7 @@ class ModifierRules internal constructor()
请将开头的 `as` 修改为 `is`
### isPublic [method]
### isPublic *- method*
```kotlin
fun isPublic()
@@ -148,7 +148,7 @@ fun isPublic()
> 添加描述 `Member` 类型包含 `public`。
### isPrivate [method]
### isPrivate *- method*
```kotlin
fun isPrivate()
@@ -162,7 +162,7 @@ fun isPrivate()
> 添加描述 `Member` 类型包含 `private`。
### isProtected [method]
### isProtected *- method*
```kotlin
fun isProtected()
@@ -176,7 +176,7 @@ fun isProtected()
> 添加描述 `Member` 类型包含 `protected`。
### isStatic [method]
### isStatic *- method*
```kotlin
fun isStatic()
@@ -194,7 +194,7 @@ fun isStatic()
!> 特别注意 Kotlin -> Jvm 后的 `object` 类中的方法并不是静态的。
### isFinal [method]
### isFinal *- method*
```kotlin
fun isFinal()
@@ -210,7 +210,7 @@ fun isFinal()
!> 特别注意在 Kotlin -> Jvm 后没有 `open` 标识的 `Member` 和没有任何关联的 `Member` 都将为 `final`
### isSynchronized [method]
### isSynchronized *- method*
```kotlin
fun isSynchronized()
@@ -224,7 +224,7 @@ fun isSynchronized()
> 添加描述 `Member` 类型包含 `synchronized`。
### isVolatile [method]
### isVolatile *- method*
```kotlin
fun isVolatile()
@@ -238,7 +238,7 @@ fun isVolatile()
> 添加描述 `Member` 类型包含 `volatile`。
### isTransient [method]
### isTransient *- method*
```kotlin
fun isTransient()
@@ -252,7 +252,7 @@ fun isTransient()
> 添加描述 `Member` 类型包含 `transient`。
### isNative [method]
### isNative *- method*
```kotlin
fun isNative()
@@ -268,7 +268,7 @@ fun isNative()
对于任意 JNI 对接的 `Member` 可添加此描述进行确定。
### isInterface [method]
### isInterface *- method*
```kotlin
fun isInterface()
@@ -282,7 +282,7 @@ fun isInterface()
> 添加描述 `Member` 类型包含 `interface`。
### isAbstract [method]
### isAbstract *- method*
```kotlin
fun isAbstract()
@@ -298,7 +298,7 @@ fun isAbstract()
对于任意的抽象 `Member` 可添加此描述进行确定。
### isStrict [method]
### isStrict *- method*
```kotlin
fun isStrict()

View File

@@ -1,4 +1,4 @@
## ModuleAppActivity [class]
## ModuleAppActivity *- class*
```kotlin
open class ModuleAppActivity : Activity()

View File

@@ -1,4 +1,4 @@
## ModuleAppCompatActivity [class]
## ModuleAppCompatActivity *- class*
```kotlin
open class ModuleAppCompatActivity : AppCompatActivity()
@@ -18,7 +18,7 @@ open class ModuleAppCompatActivity : AppCompatActivity()
在 (Xposed) 宿主环境需要重写 `moduleTheme` 设置 AppCompat 主题,否则会无法启动。
### moduleTheme [field]
### moduleTheme *- field*
```kotlin
open val moduleTheme: Int

View File

@@ -1,4 +1,4 @@
## ModuleApplication [class]
## ModuleApplication *- class*
```kotlin
open class ModuleApplication: Application()
@@ -65,7 +65,7 @@ class MyApplication: ModuleApplication() {
...>
```
### appContext [field]
### appContext *- field*
```kotlin
val appContext: ModuleApplication

View File

@@ -1,4 +1,4 @@
## ModulePreferenceFragment [class]
## ModulePreferenceFragment *- class*
```kotlin
abstract class ModulePreferenceFragment : PreferenceFragmentCompat(), SharedPreferences.OnSharedPreferenceChangeListener
@@ -36,7 +36,7 @@ class SettingsFragment : ModulePreferenceFragment() {
其余用法与 `PreferenceFragmentCompat` 保持一致。
### onCreatePreferencesInModuleApp [method]
### onCreatePreferencesInModuleApp *- method*
```kotlin
abstract fun onCreatePreferencesInModuleApp(savedInstanceState: Bundle?, rootKey: String?)
@@ -50,7 +50,7 @@ abstract fun onCreatePreferencesInModuleApp(savedInstanceState: Bundle?, rootKey
> 对接原始方法 `onCreatePreferences`。
### onSharedPreferenceChanged [method]
### onSharedPreferenceChanged *- method*
```kotlin
override fun onSharedPreferenceChanged(sharedPreferences: SharedPreferences?, key: String?)

View File

@@ -1,4 +1,4 @@
## NameConditions [class]
## NameConditions *- class*
```kotlin
class NameConditions internal constructor()
@@ -14,7 +14,7 @@ class NameConditions internal constructor()
可对 R8 混淆后的 `Member` 进行更加详细的定位。
### equalsOf
### equalsOf *- method*
```kotlin
fun equalsOf(other: String, isIgnoreCase: Boolean)
@@ -28,7 +28,7 @@ fun equalsOf(other: String, isIgnoreCase: Boolean)
> 完全字符匹配。
### startsWith
### startsWith *- method*
```kotlin
fun startsWith(prefix: String, startIndex: Int, isIgnoreCase: Boolean)
@@ -42,7 +42,7 @@ fun startsWith(prefix: String, startIndex: Int, isIgnoreCase: Boolean)
> 起始字符匹配。
### endsWith
### endsWith *- method*
```kotlin
fun endsWith(suffix: String, isIgnoreCase: Boolean)
@@ -56,7 +56,7 @@ fun endsWith(suffix: String, isIgnoreCase: Boolean)
> 结束字符匹配。
### contains
### contains *- method*
```kotlin
fun contains(other: String, isIgnoreCase: Boolean)
@@ -70,7 +70,7 @@ fun contains(other: String, isIgnoreCase: Boolean)
> 包含字符匹配。
### matches
### matches *- method*
```kotlin
fun matches(regex: String)
@@ -88,7 +88,7 @@ fun matches(regex: Regex)
> 正则字符匹配。
### thisSynthetic0
### thisSynthetic0 *- method*
```kotlin
fun thisSynthetic0()
@@ -102,7 +102,7 @@ fun thisSynthetic0()
> 标识为匿名类的主类调用对象。
### onlySymbols
### onlySymbols *- method*
```kotlin
fun onlySymbols()
@@ -116,7 +116,7 @@ fun onlySymbols()
> 标识为只有符号。
### onlyLetters
### onlyLetters *- method*
```kotlin
fun onlyLetters()
@@ -130,7 +130,7 @@ fun onlyLetters()
> 标识为只有字母。
### onlyNumbers
### onlyNumbers *- method*
```kotlin
fun onlyNumbers()
@@ -144,7 +144,7 @@ fun onlyNumbers()
> 标识为只有数字。
### onlyLettersNumbers
### onlyLettersNumbers *- method*
```kotlin
fun onlyLettersNumbers()
@@ -158,7 +158,7 @@ fun onlyLettersNumbers()
> 标识为只有字母或数字。
### onlyLowercase
### onlyLowercase *- method*
```kotlin
fun onlyLowercase()
@@ -174,7 +174,7 @@ fun onlyLowercase()
在没有其它条件的情况下设置此条件允许判断对象存在字母以外的字符。
### onlyUppercase
### onlyUppercase *- method*
```kotlin
fun onlyUppercase()

View File

@@ -1,4 +1,4 @@
## PackageParam [class]
## PackageParam *- class*
```kotlin
open class PackageParam internal constructor(internal var wrapper: PackageParamWrapper?)
@@ -12,7 +12,7 @@ open class PackageParam internal constructor(internal var wrapper: PackageParamW
> 装载 Hook 的目标 APP 入口对象实现类。
### appClassLoader [field]
### appClassLoader *- field*
```kotlin
val appClassLoaderClassLoader
@@ -26,7 +26,7 @@ val appClassLoaderClassLoader
> 获取当前 Hook APP 的 `ClassLoader`。
### appInfo [field]
### appInfo *- field*
```kotlin
val appInfo: ApplicationInfo
@@ -40,7 +40,7 @@ val appInfo: ApplicationInfo
> 获取当前 Hook APP 的 `ApplicationInfo`。
### appUserId [field]
### appUserId *- field*
```kotlin
val appUserId: Int
@@ -56,7 +56,7 @@ val appUserId: Int
机主为 `0`,应用双开 (分身) 或工作资料因系统环境不同 ID 也各不相同。
### appContext [field]
### appContext *- field*
```kotlin
val appContext: Application
@@ -72,7 +72,7 @@ val appContext: Application
!> 首次装载可能是空的,请延迟一段时间再获取或通过设置 `onAppLifecycle` 监听来完成。
### appResources [field]
### appResources *- field*
```kotlin
val appResourcesResources
@@ -88,7 +88,7 @@ val appResourcesResources
!> 你只能在 `HookResources.hook` 方法体内或 `appContext` 装载完毕时进行调用。
### systemContext [field]
### systemContext *- field*
```kotlin
val systemContext: Context
@@ -102,7 +102,7 @@ val systemContext: Context
> 获取当前系统框架的 `Context`。
### processName [field]
### processName *- field*
```kotlin
val processName: String
@@ -116,7 +116,7 @@ val processName: String
> 获取当前 Hook APP 的进程名称。
### packageName [field]
### packageName *- field*
```kotlin
val packageName: String
@@ -130,7 +130,7 @@ val packageName: String
> 获取当前 Hook APP 的包名。
### isFirstApplication [field]
### isFirstApplication *- field*
```kotlin
val isFirstApplication: Boolean
@@ -144,7 +144,7 @@ val isFirstApplication: Boolean
> 获取当前 Hook APP 是否为第一个 `Application`。
### mainProcessName [field]
### mainProcessName *- field*
```kotlin
val mainProcessName: String
@@ -160,7 +160,7 @@ val mainProcessName: String
其对应的就是 `packageName`
### moduleAppFilePath [field]
### moduleAppFilePath *- field*
```kotlin
val moduleAppFilePath: String
@@ -176,7 +176,7 @@ val moduleAppFilePath: String
!> 作为 Hook API 装载时无法使用,会获取到空字符串。
### moduleAppResources [field]
### moduleAppResources *- field*
```kotlin
val moduleAppResources: YukiModuleResources
@@ -192,7 +192,7 @@ val moduleAppResources: YukiModuleResources
!> 作为 Hook API 或不支持的 Hook Framework 装载时无法使用,会抛出异常。
### prefs [field]
### prefs *- field*
```kotlin
val prefs: YukiHookModulePrefs
@@ -208,7 +208,7 @@ val prefs: YukiHookModulePrefs
!> 作为 Hook API 装载时无法使用,会抛出异常。
### prefs [method]
### prefs *- method*
```kotlin
fun prefs(name: String): YukiHookModulePrefs
@@ -230,7 +230,7 @@ fun prefs(name: String): YukiHookModulePrefs
!> 作为 Hook API 装载时无法使用,会抛出异常。
### dataChannel [field]
### dataChannel *- field*
```kotlin
val dataChannel: YukiHookDataChannel.NameSpace
@@ -246,7 +246,7 @@ val dataChannel: YukiHookDataChannel.NameSpace
!> 作为 Hook API 装载时无法使用,会抛出异常。
### resources [method]
### resources *- method*
```kotlin
fun resources(): HookResources
@@ -262,7 +262,7 @@ fun resources(): HookResources
请调用 `HookResources.hook` 方法开始 Hook。
### refreshModuleAppResources [method]
### refreshModuleAppResources *- method*
```kotlin
fun refreshModuleAppResources()
@@ -276,7 +276,7 @@ fun refreshModuleAppResources()
> 刷新当前 Xposed 模块自身 `Resources`。
### onAppLifecycle [method]
### onAppLifecycle *- method*
```kotlin
inline fun onAppLifecycle(initiate: AppLifecycle.() -> Unit)
@@ -294,7 +294,7 @@ inline fun onAppLifecycle(initiate: AppLifecycle.() -> Unit)
!> 作为 Hook API 装载时请使用原生的 `Application` 实现生命周期监听。
### loadApp [method]
### loadApp *- method*
```kotlin
inline fun loadApp(name: String, initiate: PackageParam.() -> Unit)
@@ -352,7 +352,7 @@ loadApp {
loadApp(hooker = CustomHooker)
```
### loadZygote [method]
### loadZygote *- method*
```kotlin
inline fun loadZygote(initiate: PackageParam.() -> Unit)
@@ -372,7 +372,7 @@ fun loadZygote(hooker: YukiBaseHooker)
方法中的两个参数一个可作为 `lambda` 方法体使用,一个可以直接装载子 Hooker。
### loadSystem [method]
### loadSystem *- method*
```kotlin
inline fun loadSystem(initiate: PackageParam.() -> Unit)
@@ -392,7 +392,7 @@ fun loadSystem(hooker: YukiBaseHooker)
方法中的两个参数一个可作为 `lambda` 方法体使用,一个可以直接装载子 Hooker。
### withProcess [method]
### withProcess *- method*
```kotlin
inline fun withProcess(name: String, initiate: PackageParam.() -> Unit)
@@ -412,7 +412,7 @@ fun withProcess(name: String, hooker: YukiBaseHooker)
`name` 为 APP 的进程名称,后方的两个参数一个可作为 `lambda` 方法体使用,一个可以直接装载子 Hooker。
### loadHooker [method]
### loadHooker *- method*
```kotlin
fun loadHooker(hooker: YukiBaseHooker)
@@ -428,7 +428,7 @@ fun loadHooker(hooker: YukiBaseHooker)
你可以填入 `hooker` 在 Hooker 中继续装载 Hooker。
### clazz [field]
### String.clazz *- i-ext-field*
```kotlin
val String.clazz: Class<*>
@@ -476,7 +476,7 @@ val VariousClass.clazz: Class<*>
VariousClass("com.example.demo.DemoClass1", "com.example.demo.DemoClass2").clazz
```
### hasClass [field]
### String.hasClass *- i-ext-field*
```kotlin
val String.hasClass: Boolean
@@ -502,7 +502,7 @@ if("com.example.demo.DemoClass".hasClass) {
}
```
### findClass [method]
### findClass *- method*
```kotlin
fun findClass(name: String, loader: ClassLoader?): HookClass
@@ -576,7 +576,7 @@ val outsideLoader: ClassLoader? = ... // 假设这就是你的 ClassLoader
findClass("com.example.demo.OutsideClass1", "com.example.demo.OutsideClass2", "com.example.demo.OutsideClass3", loader = outsideLoader)
```
### fetching [method]
### ClassLoader.fetching *- i-ext-method*
```kotlin
fun ClassLoader.fetching(result: (clazz: Class<*>, resolve: Boolean) -> Unit)
@@ -639,7 +639,7 @@ customClassLoader?.fetching { clazz, resolve ->
}
```
### hook [method]
### String+Class+VariousClass+HookClass.hook *- i-ext-method*
```kotlin
inline fun String.hook(initiate: YukiMemberHookCreater.() -> Unit): YukiMemberHookCreater.Result
@@ -745,7 +745,7 @@ findClass("com.example.demo.DemoClass1", "com.example.demo.DemoClass2").hook {
}
```
### hook [method]
### HookResources.hook *- i-ext-method*
```kotlin
inline fun HookResources.hook(initiate: YukiResourcesHookCreater.() -> Unit)
@@ -777,7 +777,7 @@ resources().hook {
将 Resources 的 Hook 设置为这样是为了与 `findClass(...).hook` 做到统一,使得调用起来逻辑不会混乱。
### AppLifecycle [class]
### AppLifecycle *- class*
```kotlin
inner class AppLifecycle internal constructor()
@@ -791,7 +791,7 @@ inner class AppLifecycle internal constructor()
> 当前 Hook APP 的生命周期实例处理类。
#### attachBaseContext [method]
#### attachBaseContext *- method*
```kotlin
fun attachBaseContext(result: (baseContext: Context, hasCalledSuper: Boolean) -> Unit)
@@ -805,7 +805,7 @@ fun attachBaseContext(result: (baseContext: Context, hasCalledSuper: Boolean) ->
> 监听当前 Hook APP 装载 `Application.attachBaseContext`。
#### onCreate [method]
#### onCreate *- method*
```kotlin
fun onCreate(initiate: Application.() -> Unit)
@@ -819,7 +819,7 @@ fun onCreate(initiate: Application.() -> Unit)
> 监听当前 Hook APP 装载 `Application.onCreate`。
#### onTerminate [method]
#### onTerminate *- method*
```kotlin
fun onTerminate(initiate: Application.() -> Unit)
@@ -833,7 +833,7 @@ fun onTerminate(initiate: Application.() -> Unit)
> 监听当前 Hook APP 装载 `Application.onTerminate`。
#### onLowMemory [method]
#### onLowMemory *- method*
```kotlin
fun onLowMemory(initiate: Application.() -> Unit)
@@ -847,7 +847,7 @@ fun onLowMemory(initiate: Application.() -> Unit)
> 监听当前 Hook APP 装载 `Application.onLowMemory`。
#### onTrimMemory [method]
#### onTrimMemory *- method*
```kotlin
fun onTrimMemory(result: (self: Application, level: Int) -> Unit)
@@ -861,7 +861,7 @@ fun onTrimMemory(result: (self: Application, level: Int) -> Unit)
> 监听当前 Hook APP 装载 `Application.onTrimMemory`。
#### onConfigurationChanged [method]
#### onConfigurationChanged *- method*
```kotlin
fun onConfigurationChanged(result: (self: Application, config: Configuration) -> Unit)
@@ -875,7 +875,7 @@ fun onConfigurationChanged(result: (self: Application, config: Configuration) ->
> 监听当前 Hook APP 装载 `Application.onConfigurationChanged`。
#### registerReceiver [method]
#### registerReceiver *- method*
```kotlin
fun registerReceiver(vararg action: String, result: (context: Context, intent: Intent) -> Unit)

View File

@@ -1,4 +1,4 @@
## PrefsData [class]
## PrefsData *- class*
```kotlin
data class PrefsData<T>(var key: String, var value: T)

View File

@@ -1,4 +1,4 @@
## ReflectionFactory [kt]
## ReflectionFactory *- kt*
**变更记录**
@@ -8,7 +8,7 @@
> 这是自定义 `Member` 和 `Class` 相关功能的查找匹配以及 `invoke` 的封装类。
### MembersType [class]
### MembersType *- class*
```kotlin
enum class MembersType
@@ -22,7 +22,7 @@ enum class MembersType
> 定义一个 `Class` 中的 `Member` 类型
#### ALL [enum]
#### ALL *- enum*
```kotlin
ALL
@@ -36,7 +36,7 @@ ALL
> 全部 `Method` 与 `Constructor`。
#### METHOD [enum]
#### METHOD *- enum*
```kotlin
METHOD
@@ -50,7 +50,7 @@ METHOD
> 全部 `Method`。
#### CONSTRUCTOR [enum]
#### CONSTRUCTOR *- enum*
```kotlin
CONSTRUCTOR
@@ -64,7 +64,7 @@ CONSTRUCTOR
> 全部 `Constructor`。
### ~~hookClass [field]~~ <!-- {docsify-ignore} -->
### ~~hookClass *- field*~~ <!-- {docsify-ignore} -->
**变更记录**
@@ -74,7 +74,7 @@ CONSTRUCTOR
`HookClass` 相关功能不再对外开放
### ~~normalClass [field]~~ <!-- {docsify-ignore} -->
### ~~normalClass *- field*~~ <!-- {docsify-ignore} -->
**变更记录**
@@ -84,7 +84,7 @@ CONSTRUCTOR
`HookClass` 相关功能不再对外开放
### ~~hasClass [field]~~ <!-- {docsify-ignore} -->
### ~~hasClass *- field*~~ <!-- {docsify-ignore} -->
**变更记录**
@@ -94,7 +94,7 @@ CONSTRUCTOR
请直接使用 `hasClass()` 无参方法
### hasExtends [field]
### Class.hasExtends *- ext-field*
```kotlin
val Class<*>.hasExtends: Boolean
@@ -108,7 +108,7 @@ val Class<*>.hasExtends: Boolean
> 当前 `Class` 是否有继承关系,父类是 `Any` 将被认为没有继承关系。
### classOf [method]
### classOf *- method*
```kotlin
fun classOf(name: String, loader: ClassLoader?): Class<*>
@@ -141,7 +141,7 @@ val customClassLoader: ClassLoader? = ... // 假设这个就是你的 ClassLoade
classOf(name = "com.example.demo.DemoClass", customClassLoader)
```
### classOf [method]
### classOf *- method*
```kotlin
inline fun <reified T> classOf(loader: ClassLoader?): Class<*>
@@ -182,7 +182,7 @@ val customClassLoader: ClassLoader? = ... // 假设这个就是你的 ClassLoade
classOf<DemoClass>(customClassLoader)
```
### hasClass [method]
### String.hasClass *- ext-method*
```kotlin
fun String.hasClass(loader: ClassLoader?): Boolean
@@ -223,7 +223,7 @@ if("com.example.demo.DemoClass".hasClass(customClassloader)) {
}
```
### hasField [method]
### Class.hasField *- ext-method*
```kotlin
inline fun Class<*>.hasField(initiate: FieldCondition): Boolean
@@ -245,7 +245,7 @@ inline fun Class<*>.hasField(initiate: FieldCondition): Boolean
> 查找变量是否存在。
### hasMethod [method]
### Class.hasMethod *- ext-method*
```kotlin
inline fun Class<*>.hasMethod(initiate: MethodCondition): Boolean
@@ -271,7 +271,7 @@ inline fun Class<*>.hasMethod(initiate: MethodCondition): Boolean
> 查找方法是否存在。
### hasConstructor [method]
### Class.hasConstructor *- ext-method*
```kotlin
inline fun Class<*>.hasConstructor(initiate: ConstructorCondition): Boolean
@@ -293,7 +293,7 @@ inline fun Class<*>.hasConstructor(initiate: ConstructorCondition): Boolean
> 查找构造方法是否存在。
### hasModifiers [method]
### Member.hasModifiers *- ext-method*
```kotlin
inline fun Member.hasModifiers(initiate: ModifierRules.() -> Unit): Boolean
@@ -311,7 +311,7 @@ inline fun Member.hasModifiers(initiate: ModifierRules.() -> Unit): Boolean
> 查询 `Member` 中匹配的描述符。
### ~~obtainStaticFieldAny [method]~~ <!-- {docsify-ignore} -->
### ~~obtainStaticFieldAny *- method*~~ <!-- {docsify-ignore} -->
**变更记录**
@@ -319,7 +319,7 @@ inline fun Member.hasModifiers(initiate: ModifierRules.() -> Unit): Boolean
`v1.0.1` `移除`
### ~~obtainFieldAny [method]~~ <!-- {docsify-ignore} -->
### ~~obtainFieldAny *- method*~~ <!-- {docsify-ignore} -->
**变更记录**
@@ -327,7 +327,7 @@ inline fun Member.hasModifiers(initiate: ModifierRules.() -> Unit): Boolean
`v1.0.1` `移除`
### ~~modifyStaticField [method]~~ <!-- {docsify-ignore} -->
### ~~modifyStaticField *- method*~~ <!-- {docsify-ignore} -->
**变更记录**
@@ -335,7 +335,7 @@ inline fun Member.hasModifiers(initiate: ModifierRules.() -> Unit): Boolean
`v1.0.1` `移除`
### ~~modifyField [method]~~ <!-- {docsify-ignore} -->
### ~~modifyField *- method*~~ <!-- {docsify-ignore} -->
**变更记录**
@@ -343,7 +343,7 @@ inline fun Member.hasModifiers(initiate: ModifierRules.() -> Unit): Boolean
`v1.0.1` `移除`
### field [method]
### Class.field *- ext-method*
```kotlin
inline fun Class<*>.field(initiate: FieldCondition): FieldFinder.Result
@@ -361,7 +361,7 @@ inline fun Class<*>.field(initiate: FieldCondition): FieldFinder.Result
> 查找并得到变量。
### method [method]
### Class.method *- ext-method*
```kotlin
inline fun Class<*>.method(initiate: MethodCondition): MethodFinder.Result
@@ -389,7 +389,7 @@ inline fun Class<*>.method(initiate: MethodCondition): MethodFinder.Result
> 查找并得到方法。
### constructor [method]
### Class.constructor *- ext-method*
```kotlin
inline fun Class<*>.constructor(initiate: ConstructorCondition): ConstructorFinder.Result
@@ -415,7 +415,7 @@ inline fun Class<*>.constructor(initiate: ConstructorCondition): ConstructorFind
> 查找并得到构造方法。
### ~~callStatic [method]~~ <!-- {docsify-ignore} -->
### ~~callStatic *- method*~~ <!-- {docsify-ignore} -->
**变更记录**
@@ -427,7 +427,7 @@ inline fun Class<*>.constructor(initiate: ConstructorCondition): ConstructorFind
`v1.0.2` `移除`
### ~~call [method]~~ <!-- {docsify-ignore} -->
### ~~call *- method*~~ <!-- {docsify-ignore} -->
**变更记录**
@@ -439,7 +439,7 @@ inline fun Class<*>.constructor(initiate: ConstructorCondition): ConstructorFind
`v1.0.2` `移除`
### current [method]
### Any.current *- ext-method*
```kotlin
inline fun <reified T : Any> T.current(): CurrentClass
@@ -461,7 +461,7 @@ inline fun <reified T : Any> T.current(initiate: CurrentClass.() -> Unit): T
> 获得当前实例的类操作对象。
### buildOfAny [method]
### Class.buildOfAny *- ext-method*
```kotlin
inline fun Class<*>.buildOfAny(vararg param: Any?, initiate: ConstructorCondition): Any?
@@ -479,7 +479,7 @@ inline fun Class<*>.buildOfAny(vararg param: Any?, initiate: ConstructorConditio
> 通过构造方法创建新实例,任意类型 `Any`。
### buildOf [method]
### Class.buildOf *- ext-method*
```kotlin
inline fun <T> Class<*>.buildOf(vararg param: Any?, initiate: ConstructorCondition): T?
@@ -497,7 +497,7 @@ inline fun <T> Class<*>.buildOf(vararg param: Any?, initiate: ConstructorConditi
> 通过构造方法创建新实例,指定类型 `T`。
### allMethods [method]
### Class.allMethods *- ext-method*
```kotlin
inline fun Class<*>.allMethods(result: (index: Int, method: Method) -> Unit)
@@ -515,7 +515,7 @@ inline fun Class<*>.allMethods(result: (index: Int, method: Method) -> Unit)
> 遍历当前类中的所有方法。
### allConstructors [method]
### Class.allConstructors *- ext-method*
```kotlin
inline fun Class<*>.allConstructors(result: (index: Int, constructor: Constructor<*>) -> Unit)
@@ -533,7 +533,7 @@ inline fun Class<*>.allConstructors(result: (index: Int, constructor: Constructo
> 遍历当前类中的所有构造方法。
### allFields [method]
### Class.allFields *- ext-method*
```kotlin
inline fun Class<*>.allFields(result: (index: Int, field: Field) -> Unit)

View File

@@ -1,4 +1,4 @@
## VariableTypeFactory [kt]
## VariableTypeFactory *- kt*
**变更记录**

View File

@@ -1,4 +1,4 @@
## VariousClass [class]
## VariousClass *- class*
```kotlin
class VariousClass(vararg var name: String)
@@ -12,7 +12,7 @@ class VariousClass(vararg var name: String)
> 这是一个不确定性 `Class` 类名装载器,通过 `name` 装载 `Class` 名称数组。
### get [method]
### get *- method*
```kotlin
fun get(loader: ClassLoader? = null): Class<*>

View File

@@ -1,4 +1,4 @@
## ViewTypeFactory [kt]
## ViewTypeFactory *- kt*
**变更记录**

View File

@@ -1,4 +1,4 @@
## YukiBaseHooker [class]
## YukiBaseHooker *- class*
```kotlin
abstract class YukiBaseHooker : PackageParam()
@@ -12,7 +12,7 @@ abstract class YukiBaseHooker : PackageParam()
> `YukiHookAPI` 的子类 Hooker 实现。
### onHook [method]
### onHook *- method*
```kotlin
fun onHook()

View File

@@ -1,4 +1,4 @@
## YukiHookAPI [object]
## YukiHookAPI *- object*
```kotlin
object YukiHookAPI
@@ -12,7 +12,7 @@ object YukiHookAPI
> 这是 `YukiHookAPI` 的 API 调用总类Hook 相关功能的开始、Hook 相关功能的配置都在这里。
### API_VERSION_NAME [field]
### API_VERSION_NAME *- field*
```kotlin
const val API_VERSION_NAME: String
@@ -26,7 +26,7 @@ const val API_VERSION_NAME: String
> 获取当前 `YukiHookAPI` 的版本。
### API_VERSION_CODE [field]
### API_VERSION_CODE *- field*
```kotlin
const val API_VERSION_CODE: Int
@@ -40,7 +40,7 @@ const val API_VERSION_CODE: Int
> 获取当前 `YukiHookAPI` 的版本号。
### ~~executorName [field]~~ <!-- {docsify-ignore} -->
### ~~executorName *- field*~~ <!-- {docsify-ignore} -->
**变更记录**
@@ -50,7 +50,7 @@ const val API_VERSION_CODE: Int
请转移到 `Status.executorName`
### ~~executorVersion [field]~~ <!-- {docsify-ignore} -->
### ~~executorVersion *- field*~~ <!-- {docsify-ignore} -->
**变更记录**
@@ -60,7 +60,7 @@ const val API_VERSION_CODE: Int
请转移到 `Status.executorVersion`
### Status [object]
### Status *- object*
```kotlin
object Status
@@ -74,7 +74,7 @@ object Status
> 当前 `YukiHookAPI` 的状态。
#### executorName [field]
#### executorName *- field*
```kotlin
val executorName: String
@@ -92,7 +92,7 @@ val executorName: String
!> 在模块环境中需要启用 `Configs.isEnableHookModuleStatus`
#### executorVersion [field]
#### executorVersion *- field*
```kotlin
val executorVersion: Int
@@ -110,7 +110,7 @@ val executorVersion: Int
!> 在模块环境中需要启用 `Configs.isEnableHookModuleStatus`
#### isModuleActive [field]
#### isModuleActive *- field*
```kotlin
val isModuleActive: Boolean
@@ -130,7 +130,7 @@ val isModuleActive: Boolean
!> 在 (Xposed) 宿主环境中仅返回非 `isTaiChiModuleActive` 的激活状态。
#### isXposedModuleActive [field]
#### isXposedModuleActive *- field*
```kotlin
val isXposedModuleActive: Boolean
@@ -148,7 +148,7 @@ val isXposedModuleActive: Boolean
!> 在 (Xposed) 宿主环境中始终返回 true。
#### isTaiChiModuleActive [field]
#### isTaiChiModuleActive *- field*
```kotlin
val isTaiChiModuleActive: Boolean
@@ -166,7 +166,7 @@ val isTaiChiModuleActive: Boolean
!> 在 (Xposed) 宿主环境中始终返回 false。
#### isSupportResourcesHook [field]
#### isSupportResourcesHook *- field*
```kotlin
val isSupportResourcesHook: Boolean
@@ -186,7 +186,7 @@ val isSupportResourcesHook: Boolean
!> 请注意你需要确保 `InjectYukiHookWithXposed.isUsingResourcesHook` 已启用,否则始终返回 false。
### Configs [object]
### Configs *- object*
```kotlin
object Configs
@@ -200,7 +200,7 @@ object Configs
> 对 API 相关功能的配置类。
#### debugTag [field]
#### debugTag *- field*
```kotlin
var debugTag: String
@@ -216,7 +216,7 @@ var debugTag: String
你可以方便地进行自定义,并可以在 `Logcat``XposedBridge.log` 中找到它们。
#### isDebug [field]
#### isDebug *- field*
```kotlin
var isDebug: Boolean
@@ -232,7 +232,7 @@ var isDebug: Boolean
默认为开启状态,开启后模块将会向 `Logcat``XposedBridge.log` 打印详细的 Hook 日志,关闭后仅会打印 `E` 级别的日志。
#### isAllowPrintingLogs [field]
#### isAllowPrintingLogs *- field*
```kotlin
var isAllowPrintingLogs: Boolean
@@ -248,7 +248,7 @@ var isAllowPrintingLogs: Boolean
!> 关闭后将会停用 `YukiHookAPI` 对全部日志的输出,但是不影响当你手动调用日志方法输出日志。
#### isEnableModulePrefsCache [field]
#### isEnableModulePrefsCache *- field*
```kotlin
var isEnableModulePrefsCache: Boolean
@@ -266,7 +266,7 @@ var isEnableModulePrefsCache: Boolean
你可以手动在 `YukiHookModulePrefs` 中自由开启和关闭缓存功能以及清除缓存。
#### isEnableModuleAppResourcesCache [field]
#### isEnableModuleAppResourcesCache *- field*
```kotlin
var isEnableModuleAppResourcesCache: Boolean
@@ -286,7 +286,7 @@ var isEnableModuleAppResourcesCache: Boolean
!> 关闭后每次使用 `PackageParam.moduleAppResources` 都会重新创建,可能会造成运行缓慢。
#### isEnableHookModuleStatus [field]
#### isEnableHookModuleStatus *- field*
```kotlin
var isEnableHookModuleStatus: Boolean
@@ -304,7 +304,7 @@ var isEnableHookModuleStatus: Boolean
!> 关闭后你将不能再在模块环境中使用 `YukiHookAPI.Status` 中的功能。
#### isEnableDataChannel [field]
#### isEnableDataChannel *- field*
```kotlin
var isEnableDataChannel: Boolean
@@ -322,7 +322,7 @@ var isEnableDataChannel: Boolean
此功能默认启用,关闭后将不会在功能初始化的时候装载 `YukiHookDataChannel`
#### isEnableMemberCache [field]
#### isEnableMemberCache *- field*
```kotlin
var isEnableMemberCache: Boolean
@@ -350,7 +350,7 @@ var isEnableMemberCache: Boolean
除非缓存的 `Member` 发生了混淆的问题,例如使用 R8 混淆后的 APP 的目标 `Member`,否则建议启用。
### configs [method]
### configs *- method*
```kotlin
inline fun configs(initiate: Configs.() -> Unit)
@@ -442,7 +442,7 @@ class HookEntryClass : IYukiHookXposedInit {
}
```
### encase [method]
### encase *- method*
```kotlin
fun encase(initiate: PackageParam.() -> Unit)

View File

@@ -1,4 +1,4 @@
## YukiHookDataChannel [class]
## YukiHookDataChannel *- class*
```kotlin
class YukiHookDataChannel private constructor()
@@ -18,7 +18,7 @@ class YukiHookDataChannel private constructor()
!> 模块与宿主需要保持存活状态,否则无法建立通讯。
### NameSpace [class]
### NameSpace *- class*
```kotlin
inner class NameSpace internal constructor(private val context: Context?, private val packageName: String, private val isSecure: Boolean)
@@ -36,7 +36,7 @@ inner class NameSpace internal constructor(private val context: Context?, privat
> `YukiHookDataChannel` 命名空间。
#### with [method]
#### with *- method*
```kotlin
inline fun with(initiate: NameSpace.() -> Unit): NameSpace
@@ -50,7 +50,7 @@ inline fun with(initiate: NameSpace.() -> Unit): NameSpace
> 创建一个调用空间。
#### put [method]
#### put *- method*
```kotlin
fun <T> put(key: String, value: T)
@@ -72,7 +72,7 @@ fun put(vararg data: ChannelData<*>)
> 发送键值数据。
#### put [method]
#### put *- method*
```kotlin
fun put(key: String)
@@ -86,7 +86,7 @@ fun put(key: String)
> 仅发送键值监听,使用默认值 `VALUE_WAIT_FOR_LISTENER` 发送键值数据。
#### wait [method]
#### wait *- method*
```kotlin
fun <T> wait(key: String, result: (value: T) -> Unit)
@@ -108,7 +108,7 @@ fun <T> wait(data: ChannelData<T>, result: (value: T) -> Unit)
> 获取键值数据。
#### wait [method]
#### wait *- method*
```kotlin
fun wait(key: String, callback: () -> Unit)
@@ -124,7 +124,7 @@ fun wait(key: String, callback: () -> Unit)
!> 仅限使用 `VALUE_WAIT_FOR_LISTENER` 发送的监听才能被接收。
#### checkingVersionEquals [method]
#### checkingVersionEquals *- method*
```kotlin
fun checkingVersionEquals(result: (Boolean) -> Unit)

View File

@@ -1,4 +1,4 @@
## YukiHookFactory [kt]
## YukiHookFactory *- kt*
**变更记录**
@@ -12,7 +12,7 @@
> 这是 `YukiHookAPI` 相关 `lambda` 方法的封装类以及部分 API 用法。
### configs [method]
### IYukiHookXposedInit.configs *- ext-method*
```kotlin
inline fun IYukiHookXposedInit.configs(initiate: YukiHookAPI.Configs.() -> Unit)
@@ -30,7 +30,7 @@ inline fun IYukiHookXposedInit.configs(initiate: YukiHookAPI.Configs.() -> Unit)
> 在 `IYukiHookXposedInit` 中配置 `Configs`。
### encase [method]
### IYukiHookXposedInit.encase *- ext-method*
```kotlin
fun IYukiHookXposedInit.encase(initiate: PackageParam.() -> Unit)
@@ -52,7 +52,7 @@ fun IYukiHookXposedInit.encase(vararg hooker: YukiBaseHooker)
> 在 `IYukiHookXposedInit` 中调用 `YukiHookAPI`。
### modulePrefs [field]
### Context.modulePrefs *- ext-field*
```kotlin
val Context.modulePrefs: YukiHookModulePrefs
@@ -66,7 +66,7 @@ val Context.modulePrefs: YukiHookModulePrefs
> 获取模块的存取对象。
### modulePrefs [method]
### Context.modulePrefs *- ext-method*
```kotlin
fun Context.modulePrefs(name: String): YukiHookModulePrefs
@@ -80,7 +80,7 @@ fun Context.modulePrefs(name: String): YukiHookModulePrefs
> 获取模块的存取对象,可设置 `name` 为自定义 Sp 存储名称。
### dataChannel [method]
### Context.dataChannel *- ext-method*
```kotlin
fun Context.dataChannel(packageName: String): YukiHookDataChannel.NameSpace
@@ -94,7 +94,7 @@ fun Context.dataChannel(packageName: String): YukiHookDataChannel.NameSpace
> 获取模块的数据通讯桥命名空间对象。
### processName [field]
### Context.processName *- ext-field*
```kotlin
val Context.processName: String
@@ -108,7 +108,7 @@ val Context.processName: String
> 获取当前进程名称。
### injectModuleAppResources [method]
### Context+Resources.injectModuleAppResources *- ext-method*
```kotlin
fun Context.injectModuleAppResources()
@@ -191,7 +191,7 @@ onAppLifecycle {
}
```
### registerModuleAppActivities [method]
### Context.registerModuleAppActivities *- ext-method*
```kotlin
fun Context.registerModuleAppActivities(proxy: Any?)
@@ -335,7 +335,7 @@ val context: Context = ... // 假设这就是你的 Context
context.startActivity(context, HostTestActivity::class.java)
```
### applyTheme [method]
### Context.applyTheme *- ext-method*
```kotlin
fun Context.applyTheme(theme: Int): ModuleContextThemeWrapper
@@ -402,7 +402,7 @@ injectMember {
这样,我们就可以在宿主中非常简单地使用 `MaterialAlertDialogBuilder` 创建对话框了。
### ~~isSupportResourcesHook [field]~~ <!-- {docsify-ignore} -->
### ~~isSupportResourcesHook *- field*~~ <!-- {docsify-ignore} -->
**变更记录**
@@ -412,7 +412,7 @@ injectMember {
请转移到 `YukiHookAPI.Status.isSupportResourcesHook`
### ~~isModuleActive [field]~~ <!-- {docsify-ignore} -->
### ~~isModuleActive *- field*~~ <!-- {docsify-ignore} -->
**变更记录**
@@ -422,7 +422,7 @@ injectMember {
请转移到 `YukiHookAPI.Status.isModuleActive`
### ~~isXposedModuleActive [field]~~ <!-- {docsify-ignore} -->
### ~~isXposedModuleActive *- field*~~ <!-- {docsify-ignore} -->
**变更记录**
@@ -432,7 +432,7 @@ injectMember {
请转移到 `YukiHookAPI.Status.isXposedModuleActive`
### ~~isTaiChiModuleActive [field]~~ <!-- {docsify-ignore} -->
### ~~isTaiChiModuleActive *- field*~~ <!-- {docsify-ignore} -->
**变更记录**
@@ -442,7 +442,7 @@ injectMember {
请转移到 `YukiHookAPI.Status.isTaiChiModuleActive`
## ~~YukiHookModuleStatus [class]~~ <!-- {docsify-ignore} -->
## ~~YukiHookModuleStatus *- class*~~ <!-- {docsify-ignore} -->
**变更记录**

View File

@@ -1,4 +1,4 @@
## YukiHookModulePrefs [class]
## YukiHookModulePrefs *- class*
```kotlin
class YukiHookModulePrefs private constructor(private var context: Context?)
@@ -42,7 +42,7 @@ class YukiHookModulePrefs private constructor(private var context: Context?)
android:value="true"/>
```
### isXSharePrefsReadable [field]
### isXSharePrefsReadable *- field*
```kotlin
val isXSharePrefsReadable: Boolean
@@ -58,7 +58,7 @@ val isXSharePrefsReadable: Boolean
!> 只能在 (Xposed) 宿主环境中使用,模块环境中始终返回 false。
### isRunInNewXShareMode [field]
### isRunInNewXShareMode *- field*
```kotlin
val isRunInNewXShareMode: Boolean
@@ -76,7 +76,7 @@ val isRunInNewXShareMode: Boolean
!> 只能在模块环境中使用,(Xposed) 宿主环境中始终返回 false
### name [method]
### name *- method*
```kotlin
fun name(name: String): YukiHookModulePrefs
@@ -108,7 +108,7 @@ modulePrefs("custom_name").getString("custom_key")
prefs("custom_name").getString("custom_key")
```
### direct [method]
### direct *- method*
```kotlin
fun direct(): YukiHookModulePrefs
@@ -126,7 +126,7 @@ fun direct(): YukiHookModulePrefs
仅在 `XSharedPreferences` 下生效。
### getString [method]
### getString *- method*
```kotlin
fun getString(key: String, value: String): String
@@ -140,7 +140,7 @@ fun getString(key: String, value: String): String
> 获取 `String` 键值。
### getStringSet [method]
### getStringSet *- method*
```kotlin
fun getStringSet(key: String, value: Set<String>): Set<String>
@@ -154,7 +154,7 @@ fun getStringSet(key: String, value: Set<String>): Set<String>
> 获取 `Set<String>` 键值。
### getBoolean [method]
### getBoolean *- method*
```kotlin
fun getBoolean(key: String, value: Boolean): Boolean
@@ -168,7 +168,7 @@ fun getBoolean(key: String, value: Boolean): Boolean
> 获取 `Boolean` 键值。
### getInt [method]
### getInt *- method*
```kotlin
fun getInt(key: String, value: Int): Int
@@ -182,7 +182,7 @@ fun getInt(key: String, value: Int): Int
> 获取 `Int` 键值。
### getLong [method]
### getLong *- method*
```kotlin
fun getLong(key: String, value: Long): Long
@@ -196,7 +196,7 @@ fun getLong(key: String, value: Long): Long
> 获取 `Long` 键值。
### getFloat [method]
### getFloat *- method*
```kotlin
fun getFloat(key: String, value: Float): Float
@@ -210,7 +210,7 @@ fun getFloat(key: String, value: Float): Float
> 获取 `Float` 键值。
### all [method]
### all *- method*
```kotlin
fun all(): HashMap<String, Any?>
@@ -228,7 +228,7 @@ fun all(): HashMap<String, Any?>
!> 每次调用都会获取实时的数据,不受缓存控制,请勿在高并发场景中使用。
### remove [method]
### remove *- method*
```kotlin
fun remove(key: String)
@@ -244,7 +244,7 @@ fun remove(key: String)
!> 在 (Xposed) 宿主环境下只读,无法使用。
### remove [method]
### remove *- method*
```kotlin
inline fun <reified T> remove(prefs: PrefsData<T>)
@@ -260,7 +260,7 @@ inline fun <reified T> remove(prefs: PrefsData<T>)
!> 在 (Xposed) 宿主环境下只读,无法使用。
### clear [method]
### clear *- method*
```kotlin
fun clear()
@@ -276,7 +276,7 @@ fun clear()
!> 在 (Xposed) 宿主环境下只读,无法使用。
### putString [method]
### putString *- method*
```kotlin
fun putString(key: String, value: String)
@@ -292,7 +292,7 @@ fun putString(key: String, value: String)
!> 在 (Xposed) 宿主环境下只读,无法使用。
### putStringSet [method]
### putStringSet *- method*
```kotlin
fun putStringSet(key: String, value: Set<String>)
@@ -308,7 +308,7 @@ fun putStringSet(key: String, value: Set<String>)
!> 在 (Xposed) 宿主环境下只读,无法使用。
### putBoolean [method]
### putBoolean *- method*
```kotlin
fun putBoolean(key: String, value: Boolean)
@@ -324,7 +324,7 @@ fun putBoolean(key: String, value: Boolean)
!> 在 (Xposed) 宿主环境下只读,无法使用。
### putInt [method]
### putInt *- method*
```kotlin
fun putInt(key: String, value: Int)
@@ -340,7 +340,7 @@ fun putInt(key: String, value: Int)
!> 在 (Xposed) 宿主环境下只读,无法使用。
### putLong [method]
### putLong *- method*
```kotlin
fun putLong(key: String, value: Long)
@@ -356,7 +356,7 @@ fun putLong(key: String, value: Long)
!> 在 (Xposed) 宿主环境下只读,无法使用。
### putFloat [method]
### putFloat *- method*
```kotlin
fun putFloat(key: String, value: Float)
@@ -372,7 +372,7 @@ fun putFloat(key: String, value: Float)
!> 在 (Xposed) 宿主环境下只读,无法使用。
### get [method]
### get *- method*
```kotlin
inline fun <reified T> get(prefs: PrefsData<T>, value: T): T
@@ -386,7 +386,7 @@ inline fun <reified T> get(prefs: PrefsData<T>, value: T): T
> 智能获取指定类型的键值。
### put [method]
### put *- method*
```kotlin
inline fun <reified T> put(prefs: PrefsData<T>, value: T)
@@ -402,7 +402,7 @@ inline fun <reified T> put(prefs: PrefsData<T>, value: T)
!> 在 (Xposed) 宿主环境下只读,无法使用。
### clearCache [method]
### clearCache *- method*
```kotlin
fun clearCache()

View File

@@ -1,4 +1,4 @@
## YukiMemberHookCreater [class]
## YukiMemberHookCreater *- class*
```kotlin
class YukiMemberHookCreater(internal val packageParam: PackageParam, internal val hookClass: HookClass)
@@ -16,7 +16,7 @@ class YukiMemberHookCreater(internal val packageParam: PackageParam, internal va
> `YukiHookAPI` 的 `Member` 核心 Hook 实现类。
### PRIORITY_DEFAULT [field]
### PRIORITY_DEFAULT *- field*
```kotlin
val PRIORITY_DEFAULT: Int
@@ -30,7 +30,7 @@ val PRIORITY_DEFAULT: Int
> 默认 Hook 回调优先级。
### PRIORITY_LOWEST [field]
### PRIORITY_LOWEST *- field*
```kotlin
val PRIORITY_LOWEST: Int
@@ -44,7 +44,7 @@ val PRIORITY_LOWEST: Int
> 延迟回调 Hook 方法结果。
### PRIORITY_HIGHEST [field]
### PRIORITY_HIGHEST *- field*
```kotlin
val PRIORITY_HIGHEST: Int
@@ -58,7 +58,7 @@ val PRIORITY_HIGHEST: Int
> 更快回调 Hook 方法结果。
### instanceClass [field]
### instanceClass *- field*
```kotlin
val instanceClass: Class<*>
@@ -78,7 +78,7 @@ val instanceClass: Class<*>
!> 不推荐直接使用,万一得不到 `Class` 对象则会无法处理异常导致崩溃。
### injectMember [method]
### injectMember *- method*
```kotlin
inline fun injectMember(priority: Int, tag: String, initiate: MemberHookCreater.() -> Unit): MemberHookCreater.Result
@@ -130,7 +130,7 @@ injectMember(priority = PRIORITY_HIGHEST) {
}
```
### useDangerousOperation [method]
### useDangerousOperation *- method*
```kotlin
fun useDangerousOperation(option: String)
@@ -150,7 +150,7 @@ fun useDangerousOperation(option: String)
!> 若你不知道允许此功能会带来何种后果,请勿使用。
### MemberHookCreater [class]
### MemberHookCreater *- class*
```kotlin
inner class MemberHookCreater internal constructor(private val priority: Int, internal val tag: String)
@@ -176,7 +176,7 @@ inner class MemberHookCreater internal constructor(private val priority: Int, in
> Hook 核心功能实现类,查找和处理需要 Hook 的方法、构造方法。
#### ~~member [field]~~ <!-- {docsify-ignore} -->
#### ~~member *- field*~~ <!-- {docsify-ignore} -->
**变更记录**
@@ -186,7 +186,7 @@ inner class MemberHookCreater internal constructor(private val priority: Int, in
请转移到 `members`
#### members [method]
#### members *- method*
```kotlin
fun members(vararg member: Member?)
@@ -232,7 +232,7 @@ injectMember {
}
```
#### ~~allMethods [method]~~ <!-- {docsify-ignore} -->
#### ~~allMethods *- method*~~ <!-- {docsify-ignore} -->
**变更记录**
@@ -242,7 +242,7 @@ injectMember {
请使用 `method { name = /** name */ }.all()` 来取代它
#### ~~allConstructors [method]~~ <!-- {docsify-ignore} -->
#### ~~allConstructors *- method*~~ <!-- {docsify-ignore} -->
**变更记录**
@@ -252,7 +252,7 @@ injectMember {
请使用 `allMembers(MembersType.CONSTRUCTOR)` 来取代它
#### allMembers [method]
#### allMembers *- method*
```kotlin
fun allMembers(type: MembersType)
@@ -268,7 +268,7 @@ fun allMembers(type: MembersType)
!> 警告:无法准确处理每个方法的返回值和 `param`,建议使用 `method` or `constructor` 对每个方法单独 Hook。
#### method [method]
#### method *- method*
```kotlin
inline fun method(initiate: MethodCondition): MethodFinder.Result
@@ -304,7 +304,7 @@ injectMember {
}
```
#### constructor [method]
#### constructor *- method*
```kotlin
inline fun constructor(initiate: ConstructorCondition): ConstructorFinder.Result
@@ -336,7 +336,7 @@ injectMember {
}
```
#### field [method]
#### HookParam.field *- i-ext-method*
```kotlin
inline fun HookParam.field(initiate: FieldCondition): FieldFinder.Result
@@ -376,7 +376,7 @@ injectMember {
}
```
#### method [method]
#### HookParam.method *- i-ext-method*
```kotlin
inline fun HookParam.method(initiate: MethodCondition): MethodFinder.Result
@@ -394,7 +394,7 @@ inline fun HookParam.method(initiate: MethodCondition): MethodFinder.Result
> 使用当前 `hookClass` 查找并得到方法。
#### constructor [method]
#### HookParam.constructor *- i-ext-method*
```kotlin
inline fun HookParam.constructor(initiate: ConstructorCondition): ConstructorFinder.Result
@@ -412,7 +412,7 @@ inline fun HookParam.constructor(initiate: ConstructorCondition): ConstructorFin
> 使用当前 `hookClass` 查找并得到构造方法。
#### injectMember [method]
#### HookParam.injectMember *- i-ext-method*
```kotlin
inline fun HookParam.injectMember(priority: Int, tag: String, initiate: MemberHookCreater.() -> Unit): MemberHookCreater.Result
@@ -426,7 +426,7 @@ inline fun HookParam.injectMember(priority: Int, tag: String, initiate: MemberHo
> 注入要 Hook 的方法、构造方法 (嵌套 Hook)。
#### beforeHook [method]
#### beforeHook *- method*
```kotlin
fun beforeHook(initiate: HookParam.() -> Unit): HookCallback
@@ -444,7 +444,7 @@ fun beforeHook(initiate: HookParam.() -> Unit): HookCallback
> 在方法执行完成前 Hook。
#### afterHook [method]
#### afterHook *- method*
```kotlin
fun afterHook(initiate: HookParam.() -> Unit): HookCallback
@@ -462,7 +462,7 @@ fun afterHook(initiate: HookParam.() -> Unit): HookCallback
> 在方法执行完成后 Hook。
#### replaceAny [method]
#### replaceAny *- method*
```kotlin
fun replaceAny(initiate: HookParam.() -> Any?)
@@ -476,7 +476,7 @@ fun replaceAny(initiate: HookParam.() -> Any?)
> 拦截并替换此方法内容,给出返回值。
#### replaceUnit [method]
#### replaceUnit *- method*
```kotlin
fun replaceUnit(initiate: HookParam.() -> Unit)
@@ -490,7 +490,7 @@ fun replaceUnit(initiate: HookParam.() -> Unit)
> 拦截并替换此方法内容,没有返回值,可以称为 `Void`。
#### replaceTo [method]
#### replaceTo *- method*
```kotlin
fun replaceTo(any: Any?)
@@ -504,7 +504,7 @@ fun replaceTo(any: Any?)
> 拦截并替换方法返回值。
#### replaceToTrue [method]
#### replaceToTrue *- method*
```kotlin
fun replaceToTrue()
@@ -520,7 +520,7 @@ fun replaceToTrue()
!> 确保替换方法的返回对象为 `Boolean`
#### replaceToFalse [method]
#### replaceToFalse *- method*
```kotlin
fun replaceToFalse()
@@ -536,7 +536,7 @@ fun replaceToFalse()
!> 确保替换方法的返回对象为 `Boolean`
#### intercept [method]
#### intercept *- method*
```kotlin
fun intercept()
@@ -554,7 +554,7 @@ fun intercept()
!> 注意:例如 `Int``Long``Boolean` 常量返回值的方法一旦被设置为 null 可能会造成 Hook APP 抛出异常。
#### removeSelf [method]
#### removeSelf *- method*
```kotlin
fun removeSelf(result: (Boolean) -> Unit)
@@ -570,7 +570,7 @@ fun removeSelf(result: (Boolean) -> Unit)
!> 你只能在 Hook 回调方法中使用此功能。
#### HookCallback [class]
#### HookCallback *- class*
```kotlin
inner class HookCallback internal constructor()
@@ -584,7 +584,7 @@ inner class HookCallback internal constructor()
> Hook 方法体回调实现类。
##### onFailureThrowToApp [method]
##### onFailureThrowToApp *- method*
```kotlin
fun onFailureThrowToApp()
@@ -598,7 +598,7 @@ fun onFailureThrowToApp()
> 当回调方法体内发生异常时将异常抛出给当前 Hook APP。
#### Result [class]
#### Result *- class*
```kotlin
inner class Result internal constructor()
@@ -612,7 +612,7 @@ inner class Result internal constructor()
> 监听 Hook 结果实现类。
##### result [method]
##### result *- method*
```kotlin
inline fun result(initiate: Result.() -> Unit): Result
@@ -652,7 +652,7 @@ injectMember {
}
```
##### by [method]
##### by *- method*
```kotlin
inline fun by(condition: () -> Boolean): Result
@@ -670,7 +670,7 @@ inline fun by(condition: () -> Boolean): Result
> 添加执行 Hook 需要满足的条件,不满足条件将直接停止 Hook。
##### onHooked [method]
##### onHooked *- method*
```kotlin
fun onHooked(result: (Member) -> Unit): Result
@@ -688,7 +688,7 @@ fun onHooked(result: (Member) -> Unit): Result
在重复 Hook 时会回调 `onAlreadyHooked`
##### onAlreadyHooked [method]
##### onAlreadyHooked *- method*
```kotlin
fun onAlreadyHooked(result: (Member) -> Unit): Result
@@ -704,7 +704,7 @@ fun onAlreadyHooked(result: (Member) -> Unit): Result
!> 同一个 `hookClass` 中的同一个 `members` 不会被 API 重复 Hook若由于各种原因重复 Hook 会回调此方法。
##### onNoSuchMemberFailure [method]
##### onNoSuchMemberFailure *- method*
```kotlin
fun onNoSuchMemberFailure(result: (Throwable) -> Unit): Result
@@ -718,7 +718,7 @@ fun onNoSuchMemberFailure(result: (Throwable) -> Unit): Result
> 监听 `members` 不存在发生错误的回调方法。
##### onConductFailure [method]
##### onConductFailure *- method*
```kotlin
fun onConductFailure(result: (HookParam, Throwable) -> Unit): Result
@@ -732,7 +732,7 @@ fun onConductFailure(result: (HookParam, Throwable) -> Unit): Result
> 监听 Hook 进行过程中发生错误的回调方法。
##### onHookingFailure [method]
##### onHookingFailure *- method*
```kotlin
fun onHookingFailure(result: (Throwable) -> Unit): Result
@@ -746,7 +746,7 @@ fun onHookingFailure(result: (Throwable) -> Unit): Result
> 监听 Hook 开始时发生的错误的回调方法。
##### onAllFailure [method]
##### onAllFailure *- method*
```kotlin
fun onAllFailure(result: (Throwable) -> Unit): Result
@@ -760,7 +760,7 @@ fun onAllFailure(result: (Throwable) -> Unit): Result
> 监听全部 Hook 过程发生错误的回调方法。
##### ignoredNoSuchMemberFailure [method]
##### ignoredNoSuchMemberFailure *- method*
```kotlin
fun ignoredNoSuchMemberFailure(): Result
@@ -774,7 +774,7 @@ fun ignoredNoSuchMemberFailure(): Result
> 忽略 `members` 不存在发生的错误。
##### ignoredConductFailure [method]
##### ignoredConductFailure *- method*
```kotlin
fun ignoredConductFailure(): Result
@@ -788,7 +788,7 @@ fun ignoredConductFailure(): Result
> 忽略 Hook 进行过程中发生的错误。
##### ignoredHookingFailure [method]
##### ignoredHookingFailure *- method*
```kotlin
fun ignoredHookingFailure(): Result
@@ -802,7 +802,7 @@ fun ignoredHookingFailure(): Result
> 忽略 Hook 开始时发生的错误。
##### ignoredAllFailure [method]
##### ignoredAllFailure *- method*
```kotlin
fun ignoredAllFailure(): Result
@@ -816,7 +816,7 @@ fun ignoredAllFailure(): Result
> 忽略全部 Hook 过程发生的错误。
##### remove [method]
##### remove *- method*
```kotlin
fun remove(result: (Boolean) -> Unit)
@@ -832,7 +832,7 @@ fun remove(result: (Boolean) -> Unit)
!> 你只能在 Hook 成功后才能解除 Hook可监听 `onHooked` 事件。
### Result [class]
### Result *- class*
```kotlin
inner class Result internal constructor()
@@ -846,7 +846,7 @@ inner class Result internal constructor()
> 监听全部 Hook 结果实现类。
#### result [method]
#### result *- method*
```kotlin
inline fun result(initiate: Result.() -> Unit): Result
@@ -868,7 +868,7 @@ inline fun result(initiate: Result.() -> Unit): Result
> 创建监听事件方法体。
#### by [method]
#### by *- method*
```kotlin
inline fun by(condition: () -> Boolean): Result
@@ -886,7 +886,7 @@ inline fun by(condition: () -> Boolean): Result
> 添加执行 Hook 需要满足的条件,不满足条件将直接停止 Hook。
#### onPrepareHook [method]
#### onPrepareHook *- method*
```kotlin
fun onPrepareHook(callback: () -> Unit): Result
@@ -900,7 +900,7 @@ fun onPrepareHook(callback: () -> Unit): Result
> 监听 `hookClass` 存在时准备开始 Hook 的操作。
#### onHookClassNotFoundFailure [method]
#### onHookClassNotFoundFailure *- method*
```kotlin
fun onHookClassNotFoundFailure(result: (Throwable) -> Unit): Result
@@ -914,7 +914,7 @@ fun onHookClassNotFoundFailure(result: (Throwable) -> Unit): Result
> 监听 `hookClass` 找不到时发生错误的回调方法。
#### ignoredHookClassNotFoundFailure [method]
#### ignoredHookClassNotFoundFailure *- method*
```kotlin
fun ignoredHookClassNotFoundFailure(): Result

View File

@@ -1,4 +1,4 @@
## YukiModuleResources [class]
## YukiModuleResources *- class*
```kotlin
class YukiModuleResources private constructor(private val baseInstance: XModuleResources) : Resources
@@ -12,7 +12,7 @@ class YukiModuleResources private constructor(private val baseInstance: XModuleR
> 对接 `XModuleResources` 的中间层实例。
### fwd [method]
### fwd *- method*
```kotlin
fun fwd(resId: Int): YukiResForwarder

View File

@@ -1,4 +1,4 @@
## YukiResForwarder [class]
## YukiResForwarder *- class*
```kotlin
class YukiResForwarder private constructor(private val baseInstance: XResForwarder)
@@ -12,7 +12,7 @@ class YukiResForwarder private constructor(private val baseInstance: XResForward
> 对接 `XResForwarder` 的中间层实例。
### ~~instance [field]~~ <!-- {docsify-ignore} -->
### ~~instance *- field*~~ <!-- {docsify-ignore} -->
**变更记录**
@@ -22,7 +22,7 @@ class YukiResForwarder private constructor(private val baseInstance: XResForward
不再对外公开 `instance` 参数
### id [field]
### id *- field*
```kotlin
val id: Int
@@ -36,7 +36,7 @@ val id: Int
> 获得当前 APP 的 Resources Id。
### resources [field]
### resources *- field*
```kotlin
val resources: Resources

View File

@@ -1,4 +1,4 @@
## YukiResources [class]
## YukiResources *- class*
```kotlin
class YukiResources private constructor(private val baseInstance: XResources) : Resources
@@ -12,7 +12,7 @@ class YukiResources private constructor(private val baseInstance: XResources) :
> 对接 `XResources` 的中间层实例。
### LayoutInflatedParam [class]
### LayoutInflatedParam *- class*
```kotlin
class LayoutInflatedParam(internal val baseParam: XC_LayoutInflated.LayoutInflatedParam)
@@ -26,7 +26,7 @@ class LayoutInflatedParam(internal val baseParam: XC_LayoutInflated.LayoutInflat
> 装载 Hook APP 的目标布局 Resources 实现类。
#### variantName [field]
#### variantName *- field*
```kotlin
val variantName: String
@@ -42,7 +42,7 @@ val variantName: String
例如:`layout``layout-land``layout-sw600dp`
#### currentView [field]
#### currentView *- field*
```kotlin
val currentView: View
@@ -56,7 +56,7 @@ val currentView: View
> 获取当前被 Hook 的布局实例。
#### findViewByIdentifier [method]
#### findViewByIdentifier *- method*
```kotlin
inline fun <reified T : View> View.findViewByIdentifier(name: String): T?

View File

@@ -1,4 +1,4 @@
## YukiResourcesHookCreater [class]
## YukiResourcesHookCreater *- class*
```kotlin
class YukiResourcesHookCreater(internal val packageParam: PackageParam, internal val hookResources: HookResources)
@@ -12,7 +12,7 @@ class YukiResourcesHookCreater(internal val packageParam: PackageParam, internal
> `YukiHookAPI` 的 `Resources` 核心 Hook 实现类。
### injectResource [method]
### injectResource *- method*
```kotlin
inline fun injectResource(tag: String, initiate: ResourceHookCreater.() -> Unit): ResourceHookCreater.Result
@@ -48,7 +48,7 @@ injectResource(tag = "KuriharaYuki") {
}
```
### ResourcesHookCreater [class]
### ResourcesHookCreater *- class*
```kotlin
inner class ResourcesHookCreater internal constructor(private val tag: String)
@@ -68,7 +68,7 @@ inner class ResourcesHookCreater internal constructor(private val tag: String)
查找和处理需要 Hook 的 Resources。
#### resourceId [field]
#### resourceId *- field*
```kotlin
var resourceId: Int
@@ -97,7 +97,7 @@ injectResource {
}
```
#### conditions [method]
#### conditions *- method*
```kotlin
inline fun conditions(initiate: ConditionFinder.() -> Unit)
@@ -129,7 +129,7 @@ injectResource {
}
```
#### replaceTo [method]
#### replaceTo *- method*
```kotlin
fun replaceTo(any: Any)
@@ -175,7 +175,7 @@ injectResource {
}
```
#### replaceToTrue [method]
#### replaceToTrue *- method*
```kotlin
fun replaceToTrue()
@@ -191,7 +191,7 @@ fun replaceToTrue()
!> 确保目标替换 Resources 的类型为 `Boolean`
#### replaceToFalse [method]
#### replaceToFalse *- method*
```kotlin
fun replaceToFalse()
@@ -207,7 +207,7 @@ fun replaceToFalse()
!> 确保目标替换 Resources 的类型为 `Boolean`
#### replaceToModuleResource [method]
#### replaceToModuleResource *- method*
```kotlin
fun replaceToModuleResource(resId: Int)
@@ -257,7 +257,7 @@ injectResource {
}
```
#### injectAsLayout [method]
#### injectAsLayout *- method*
```kotlin
fun injectAsLayout(initiate: YukiResources.LayoutInflatedParam.() -> Unit)
@@ -306,7 +306,7 @@ injectResource {
}
```
#### ConditionFinder [class]
#### ConditionFinder *- class*
```kotlin
inner class ConditionFinder internal constructor()
@@ -320,7 +320,7 @@ inner class ConditionFinder internal constructor()
> Resources 查找条件实现类。
##### name [field]
##### name *- field*
```kotlin
var name: String
@@ -334,7 +334,7 @@ var name: String
> 设置 Resources 名称。
##### anim [method]
##### anim *- method*
```kotlin
fun anim()
@@ -348,7 +348,7 @@ fun anim()
> 设置 Resources 类型为动画。
##### animator [method]
##### animator *- method*
```kotlin
fun animator()
@@ -362,7 +362,7 @@ fun animator()
> 设置 Resources 类型为属性动画。
##### bool [method]
##### bool *- method*
```kotlin
fun bool()
@@ -376,7 +376,7 @@ fun bool()
> 设置 Resources 类型为布朗(Boolean)。
##### color [method]
##### color *- method*
```kotlin
fun color()
@@ -390,7 +390,7 @@ fun color()
> 设置 Resources 类型为颜色(Color)。
##### dimen [method]
##### dimen *- method*
```kotlin
fun dimen()
@@ -404,7 +404,7 @@ fun dimen()
> 设置 Resources 类型为尺寸(Dimention)。
##### drawable [method]
##### drawable *- method*
```kotlin
fun drawable()
@@ -418,7 +418,7 @@ fun drawable()
> 设置 Resources 类型为 Drawable。
##### integer [method]
##### integer *- method*
```kotlin
fun integer()
@@ -432,7 +432,7 @@ fun integer()
> 设置 Resources 类型为整型(Integer)。
##### layout [method]
##### layout *- method*
```kotlin
fun layout()
@@ -446,7 +446,7 @@ fun layout()
> 设置 Resources 类型为布局(Layout)。
##### plurals [method]
##### plurals *- method*
```kotlin
fun plurals()
@@ -460,7 +460,7 @@ fun plurals()
> 设置 Resources 类型为 Plurals。
##### string [method]
##### string *- method*
```kotlin
fun string()
@@ -474,7 +474,7 @@ fun string()
> 设置 Resources 类型为字符串(String)。
##### xml [method]
##### xml *- method*
```kotlin
fun xml()
@@ -488,7 +488,7 @@ fun xml()
> 设置 Resources 类型为 Xml。
##### mipmap [method]
##### mipmap *- method*
```kotlin
fun mipmap()
@@ -502,7 +502,7 @@ fun mipmap()
> 设置 Resources 类型为位图(Mipmap)。
##### array [method]
##### array *- method*
```kotlin
fun array()
@@ -516,7 +516,7 @@ fun array()
> 设置 Resources 类型为数组(Array)。
#### Result [class]
#### Result *- class*
```kotlin
inner class Result internal constructor()
@@ -530,7 +530,7 @@ inner class Result internal constructor()
> 监听全部 Hook 结果实现类,可在这里处理失败事件监听。
##### result [method]
##### result *- method*
```kotlin
inline fun result(initiate: Result.() -> Unit): Result
@@ -544,7 +544,7 @@ inline fun result(initiate: Result.() -> Unit): Result
> 创建监听事件方法体。
##### by [method]
##### by *- method*
```kotlin
inline fun by(condition: () -> Boolean): Result
@@ -558,7 +558,7 @@ inline fun by(condition: () -> Boolean): Result
> 添加执行 Hook 需要满足的条件,不满足条件将直接停止 Hook。
#### onHookingFailure [method]
#### onHookingFailure *- method*
```kotlin
fun onHookingFailure(result: (Throwable) -> Unit): Result
@@ -572,7 +572,7 @@ fun onHookingFailure(result: (Throwable) -> Unit): Result
> 监听 Hook 过程发生错误的回调方法。
#### ignoredHookingFailure [method]
#### ignoredHookingFailure *- method*
```kotlin
fun ignoredHookingFailure(): Result

View File

@@ -1,4 +1,4 @@
## YukiXposedEvent [object]
## YukiXposedEvent *- object*
```kotlin
object YukiXposedEvent
@@ -12,7 +12,7 @@ object YukiXposedEvent
> 实现对原生 Xposed API 的装载事件监听。
### events [method]
### events *- method*
```kotlin
inline fun events(initiate: YukiXposedEvent.() -> Unit)
@@ -26,7 +26,7 @@ inline fun events(initiate: YukiXposedEvent.() -> Unit)
> 对 `YukiXposedEvent` 创建一个方法体。
### onInitZygote [method]
### onInitZygote *- method*
```kotlin
fun onInitZygote(result: (StartupParam) -> Unit)
@@ -40,7 +40,7 @@ fun onInitZygote(result: (StartupParam) -> Unit)
> 设置 initZygote 事件监听。
### onHandleLoadPackage [method]
### onHandleLoadPackage *- method*
```kotlin
fun onHandleLoadPackage(result: (LoadPackageParam) -> Unit)
@@ -54,7 +54,7 @@ fun onHandleLoadPackage(result: (LoadPackageParam) -> Unit)
> 设置 handleLoadPackage 事件监听。
### onHandleInitPackageResources [method]
### onHandleInitPackageResources *- method*
```kotlin
fun onHandleInitPackageResources(result: (InitPackageResourcesParam) -> Unit)

View File

@@ -242,7 +242,7 @@ encase {
- 装载 `handleInitPackageResources``encase`
在这个过程中,你需要使用 `loadApp``loadSystem``loadZygote` 来区分每一次装载代码的用域,否则你的代码就会被<u>**多次执行造成错误**</u>
在这个过程中,你需要使用 `loadApp``loadSystem``loadZygote` 来区分每一次装载代码的用域,否则你的代码就会被<u>**多次执行造成错误**</u>
下面是两个**错误**示例。
@@ -363,4 +363,4 @@ fun encase(baseContext: Context?, vararg hooker: YukiBaseHooker)
!> Resources Hook 功能不支持作为 Hook API 使用。
<br/><br/>
[浏览下一篇 ➡️](config/api-exception.md)
[浏览下一篇 &nbsp;➡️](config/api-exception.md)

View File

@@ -1294,4 +1294,4 @@ context.applyTheme(R.style.Theme_AppCompat).applyTheme(R.style.Theme_AppCompat)
`Context` 中只能创建一次 `ModuleContextThemeWrapper`,请检查代码是否有循环调用问题。
<br/><br/>
[浏览下一篇 ➡️](config/xposed-using.md)
[浏览下一篇 &nbsp;➡️](config/xposed-using.md)

View File

@@ -108,4 +108,4 @@ override fun attachBaseContext(base: Context?) {
```
<br/><br/>
[浏览下一篇 ➡️](config/r8-proguard.md)
[浏览下一篇 &nbsp;➡️](config/r8-proguard.md)

View File

@@ -19,4 +19,4 @@ android.enableR8=true
```
<br/><br/>
[浏览下一篇 ➡️](tools/yukihookapi-projectbuilder.md)
[浏览下一篇 &nbsp;➡️](tools/yukihookapi-projectbuilder.md)

View File

@@ -55,7 +55,7 @@ annotation class InjectYukiHookWithXposed(
示例 2 `com.example.demo.hook.custom.CustomClass`
若你不想使用此格式定义入口类的包名,你可以直接设置 `modulePackageName` 的参数。
若你不想使用此格式定义入口类的包名,例如你的包名动态的,类似使用 `productFlavors` 进行多渠道打包,你可以直接设置 `modulePackageName` 的参数。
> 示例如下
@@ -237,4 +237,4 @@ class HookEntry: IYukiHookXposedInit {
若要了解更多可 [点击这里](api/document?id=onxposedevent-method) 进行查看。
<br/><br/>
[浏览下一篇 ➡️](config/api-using.md)
[浏览下一篇 &nbsp;➡️](config/api-using.md)

View File

@@ -68,7 +68,7 @@ resources().hook {
## 一个简单的 Hook 例子
> 这里给出了 Hook APP、Hook 系统框架与 Hook Resources 例子,可供参考。
> 这里给出了 Hook APP、Hook 系统框架与 Hook Resources 例子,可供参考。
### Hook APP
@@ -423,7 +423,12 @@ method {
```kotlin
// <情景1>
injectMember {
throw RuntimeException("Exception Test")
method {
throw RuntimeException("Exception Test")
}
afterHook {
// ...
}
}.result {
// 能够捕获到 RuntimeException
onHookingFailure {}
@@ -446,7 +451,7 @@ injectMember {
若我们想将这些异常直接抛给宿主,原生的 Xposed 为我们提供了 `param.throwable` 方法,`YukiHookAPI` 同样可以实现此功能。
若想在 Hook 回调方法中将一个异常直接抛给宿主,可以有如下实现方法。
若想在 Hook 回调方法中将一个异常直接抛给宿主,可以有如下实现方法。
> 示例如下
@@ -461,7 +466,7 @@ injectMember {
}
```
你也可以直接在 Hook 回调方法中抛出异常,然后标识将异常抛给宿主。
你也可以直接在 Hook 回调方法中抛出异常,然后标识将异常抛给宿主。
> 示例如下
@@ -613,4 +618,4 @@ if(YukiHookAPI.Status.isModuleActive) {
!> 除了提供标准 API 的 Hook 框架之外,其它情况下模块可能都将无法判断自己是否被激活。
<br/><br/>
[浏览下一篇 ➡️](guide/special-feature.md)
[浏览下一篇 &nbsp;➡️](guide/special-feature.md)

View File

@@ -40,7 +40,7 @@
- **方便移植**
原生支持 Xposed API 用法,并原生对接 Xposed API拥有 Xposed API 的 Hook 框架都能快速对接 Yuki Hook API。
原生支持 Xposed API 用法,并原生对接 Xposed API拥有 Xposed API 的 Hook 框架都能快速对接 `YukiHookAPI`
- **支持混淆**
@@ -205,4 +205,4 @@ class HookEntry : IXposedHookZygoteInit, IXposedHookLoadPackage, IXposedHookInit
| [Xposed](https://github.com/rovo89/Xposed) | ❎ | 未测试,不再推荐使用 |
<br/><br/>
[浏览下一篇 ➡️](guide/knowledge.md)
[浏览下一篇 &nbsp;➡️](guide/knowledge.md)

View File

@@ -2,6 +2,8 @@
> 这里收集了 Xposed 相关的介绍以及开启前需要掌握的知识要点,已经了解的同学可以略过。
基础知识内容<u>**并不一定完全准确**</u>,请根据自己的见解酌情阅读,若发现内容**有错误欢迎指正并帮助我们完善和改进**。
## 相关介绍
> 这里介绍了 Xposed 以及 Hook 的工作原理。
@@ -27,11 +29,11 @@ Xposed Framework
...
```
我们可以在宿主(APP)运行时通过注入宿主(APP)来达到控制其行为的最终目的。
我们可以在宿主 (APP) 运行时通过注入宿主 (APP) 来达到控制其行为的最终目的。
Xposed 的这种运行方式被称为**寄生**Xposed 模块跟随宿主的生命周期,在宿主的生命周期内完成自己的生命历程。
我们可以通过反射的方式调用宿主的方法、变量、构造方法,以及使用 `XposedBridge` 所提供的 Hook 操作动态地在宿主(APP)要执行的方法前后插入自己的代码,或完全替换目标,甚至是拦截。
我们可以通过反射的方式调用宿主的方法、变量、构造方法,以及使用 `XposedBridge` 所提供的 Hook 操作动态地在宿主 (APP) 要执行的方法前后插入自己的代码,或完全替换目标,甚至是拦截。
### 发展过程
@@ -68,7 +70,7 @@ App's Environment
## 让我们开始吧
在开始之前,你需要拥有下基础才能更好地使用 `YukiHookAPI`
在开始之前,你需要拥有下基础才能更好地使用 `YukiHookAPI`
- 掌握并了解 Android 开发及简单的系统运行原理
@@ -83,4 +85,4 @@ App's Environment
- 掌握并了解 Kotlin 与 Java 混编、互相调用以及 Kotlin 生成的 Java 字节码
<br/><br/>
[浏览下一篇 ➡️](guide/quick-start.md)
[浏览下一篇 &nbsp;➡️](guide/quick-start.md)

View File

@@ -252,4 +252,4 @@ override fun replaceHookedMethod(param: MethodHookParam) = null
`YukiHookAPI` 对 Xposed API 进行了完全重写,你可以参考 [API 文档](api/home) 以及 [特色功能](guide/special-feature) 来决定一些功能性的迁移和使用。
<br/><br/>
[浏览下一篇 ➡️](config/api-example.md)
[浏览下一篇 &nbsp;➡️](config/api-example.md)

View File

@@ -6,9 +6,9 @@
- Windows 7 及以上/macOS 10.14 及以上/Linux 发行版(Arch/Debian)
- Android Studio 4.1 及以上
- Android Studio 2021.1 及以上
- IntelliJ IDEA 2021.01 及以上
- IntelliJ IDEA 2021.1 及以上
- Kotlin 1.6.0 及以上
@@ -186,4 +186,4 @@ override fun attachBaseContext(base: Context?) {
!> 由于你使用了自定义的 Hook 框架而并非模块,~~`YukiHookModuleStatus`~~ ~~`YukiHookModulePrefs`~~ ~~`YukiHookDataChannel`~~ 以及 Resources Hook 功能将失效。
<br/><br/>
[浏览下一篇 ➡️](guide/example.md)
[浏览下一篇 &nbsp;➡️](guide/example.md)

View File

@@ -687,7 +687,7 @@ classOf("com.demo.Test").buildOfAny(true) { param(BooleanType) }?.current {
}
```
更多用法可参考 [CurrentClass](api/document?id=currentclass-class) 以及 [buildOf](api/document?id=buildof-method) 方法。
更多用法可参考 [CurrentClass](api/document?id=currentclass-class) 以及 [Class.buildOf](api/document?id=classbuildof-ext-method) 方法。
### 再次查询
@@ -1070,7 +1070,7 @@ method {
}
```
更多类型请 [点击这里](api/document?id=graphicstypefactory-kt) 前往查看,也欢迎你能贡献更多的常用类型。
更多类型请 [点击这里](api/document?id=componenttypefactory-kt) 前往查看,也欢迎你能贡献更多的常用类型。
## 调试日志功能
@@ -1493,4 +1493,4 @@ loadApp(name = "com.example.demo") {
详情请参考 [AppLifecycle](api/document?id=applifecycle-class)。
<br/><br/>
[浏览下一篇 ➡️](guide/move-to-new-api.md)
[浏览下一篇 &nbsp;➡️](guide/move-to-new-api.md)

View File

@@ -35,4 +35,4 @@
软件语言跟随当前系统,你可以在菜单栏 **语言 (Language)** 一栏手动选择软件的界面语言。
<br/><br/>
[浏览下一篇 ➡️](api/home.md)
[浏览下一篇 &nbsp;➡️](api/home.md)

View File

@@ -113,7 +113,7 @@ val Context.processName
*
* 注入的资源作用域仅限当前 [Context] - 你需要在每个用到宿主 [Context] 的地方重复调用此方法进行注入才能使用
*
* 详情请参考 [injectModuleAppResources](https://fankes.github.io/YukiHookAPI/#/api/document?id=injectmoduleappresources-method)
* 详情请参考 [Context+Resources.injectModuleAppResources](https://fankes.github.io/YukiHookAPI/#/api/document?id=contextresourcesinjectmoduleappresources-ext-method)
*
* - ❗只能在 (Xposed) 宿主环境使用此功能 - 其它环境下使用将不生效且会打印警告信息
*/
@@ -126,7 +126,7 @@ fun Context.injectModuleAppResources() = resources?.injectModuleAppResources()
*
* 注入的资源作用域仅限当前 [Resources] - 你需要在每个用到宿主 [Resources] 的地方重复调用此方法进行注入才能使用
*
* 详情请参考 [injectModuleAppResources](https://fankes.github.io/YukiHookAPI/#/api/document?id=injectmoduleappresources-method)
* 详情请参考 [Context+Resources.injectModuleAppResources](https://fankes.github.io/YukiHookAPI/#/api/document?id=contextresourcesinjectmoduleappresources-ext-method)
*
* - ❗只能在 (Xposed) 宿主环境使用此功能 - 其它环境下使用将不生效且会打印警告信息
*/
@@ -139,7 +139,7 @@ fun Resources.injectModuleAppResources() = AppParasitics.injectModuleAppResource
*
* - 你要将需要在宿主启动的 [Activity] 继承于 [ModuleAppActivity] 或 [ModuleAppCompatActivity]
*
* 详情请参考 [registerModuleAppActivities](https://fankes.github.io/YukiHookAPI/#/api/document?id=registermoduleappactivities-method)
* 详情请参考 [Context.registerModuleAppActivities](https://fankes.github.io/YukiHookAPI/#/api/document?id=contextregistermoduleappactivities-ext-method)
*
* - ❗只能在 (Xposed) 宿主环境使用此功能 - 其它环境下使用将不生效且会打印警告信息
* @param proxy 代理的 [Activity] - 必须存在于宿主的 AndroidMainifest 清单中 - 不填使用默认 [Activity]
@@ -151,7 +151,7 @@ fun Context.registerModuleAppActivities(proxy: Any? = null) = AppParasitics.regi
*
* 在 Hook APP (宿主) 中使用此方法会自动调用 [injectModuleAppResources] 注入当前 Xposed 模块的资源
*
* 详情请参考 [applyTheme](https://fankes.github.io/YukiHookAPI/#/api/document?id=applytheme-method)
* 详情请参考 [Context.applyTheme](https://fankes.github.io/YukiHookAPI/#/api/document?id=contextapplytheme-ext-method)
* @param theme 主题资源 ID
* @return [ModuleContextThemeWrapper]
*/