mirror of
https://github.com/HighCapable/YukiHookAPI.git
synced 2025-09-04 09:45:19 +08:00
Specification callback code style
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
|
||||
- 方便移植 快速上手
|
||||
|
||||
<font size=3 style="opacity: 0.6">`更新时间 2022-05-29 03:50`</font>
|
||||
<font size=3 style="opacity: 0.6">`更新时间 2022-05-30 04:50`</font>
|
||||
|
||||
[GitHub](https://github.com/fankes/YukiHookAPI)
|
||||
[Get Started](#介绍)
|
||||
|
@@ -374,7 +374,7 @@ constructor {
|
||||
#### onNoSuchConstructor [method]
|
||||
|
||||
```kotlin
|
||||
inline fun onNoSuchConstructor(initiate: (Throwable) -> Unit): Result
|
||||
inline fun onNoSuchConstructor(result: (Throwable) -> Unit): Result
|
||||
```
|
||||
|
||||
**变更记录**
|
||||
|
@@ -268,7 +268,7 @@ fun give(): Field?
|
||||
#### onNoSuchField [method]
|
||||
|
||||
```kotlin
|
||||
fun onNoSuchField(initiate: (Throwable) -> Unit): Result
|
||||
fun onNoSuchField(result: (Throwable) -> Unit): Result
|
||||
```
|
||||
|
||||
**变更记录**
|
||||
|
@@ -466,7 +466,7 @@ method {
|
||||
#### onNoSuchMethod [method]
|
||||
|
||||
```kotlin
|
||||
inline fun onNoSuchMethod(initiate: (Throwable) -> Unit): Result
|
||||
inline fun onNoSuchMethod(result: (Throwable) -> Unit): Result
|
||||
```
|
||||
|
||||
**变更记录**
|
||||
|
@@ -656,7 +656,7 @@ inner class AppLifecycle internal constructor()
|
||||
#### attachBaseContext [method]
|
||||
|
||||
```kotlin
|
||||
fun attachBaseContext(initiate: (baseContext: Context, hasCalledSuper: Boolean) -> Unit)
|
||||
fun attachBaseContext(result: (baseContext: Context, hasCalledSuper: Boolean) -> Unit)
|
||||
```
|
||||
|
||||
**变更记录**
|
||||
@@ -712,7 +712,7 @@ fun onLowMemory(initiate: Application.() -> Unit)
|
||||
#### onTrimMemory [method]
|
||||
|
||||
```kotlin
|
||||
fun onTrimMemory(initiate: (self: Application, level: Int) -> Unit)
|
||||
fun onTrimMemory(result: (self: Application, level: Int) -> Unit)
|
||||
```
|
||||
|
||||
**变更记录**
|
||||
@@ -726,7 +726,7 @@ fun onTrimMemory(initiate: (self: Application, level: Int) -> Unit)
|
||||
#### onConfigurationChanged [method]
|
||||
|
||||
```kotlin
|
||||
fun onConfigurationChanged(initiate: (self: Application, config: Configuration) -> Unit)
|
||||
fun onConfigurationChanged(result: (self: Application, config: Configuration) -> Unit)
|
||||
```
|
||||
|
||||
**变更记录**
|
||||
@@ -740,7 +740,7 @@ fun onConfigurationChanged(initiate: (self: Application, config: Configuration)
|
||||
#### registerReceiver [method]
|
||||
|
||||
```kotlin
|
||||
fun registerReceiver(vararg action: String, initiate: (context: Context, intent: Intent) -> Unit)
|
||||
fun registerReceiver(vararg action: String, result: (context: Context, intent: Intent) -> Unit)
|
||||
```
|
||||
|
||||
**变更记录**
|
||||
|
@@ -393,7 +393,7 @@ inline fun <T> Class<*>.buildOf(vararg param: Any?, initiate: ConstructorFinder.
|
||||
### allMethods [method]
|
||||
|
||||
```kotlin
|
||||
inline fun Class<*>.allMethods(callback: (index: Int, method: Method) -> Unit)
|
||||
inline fun Class<*>.allMethods(result: (index: Int, method: Method) -> Unit)
|
||||
```
|
||||
|
||||
**变更记录**
|
||||
@@ -411,7 +411,7 @@ inline fun Class<*>.allMethods(callback: (index: Int, method: Method) -> Unit)
|
||||
### allConstructors [method]
|
||||
|
||||
```kotlin
|
||||
inline fun Class<*>.allConstructors(callback: (index: Int, constructor: Constructor<*>) -> Unit)
|
||||
inline fun Class<*>.allConstructors(result: (index: Int, constructor: Constructor<*>) -> Unit)
|
||||
```
|
||||
|
||||
**变更记录**
|
||||
@@ -429,7 +429,7 @@ inline fun Class<*>.allConstructors(callback: (index: Int, constructor: Construc
|
||||
### allFields [method]
|
||||
|
||||
```kotlin
|
||||
inline fun Class<*>.allFields(callback: (index: Int, field: Field) -> Unit)
|
||||
inline fun Class<*>.allFields(result: (index: Int, field: Field) -> Unit)
|
||||
```
|
||||
|
||||
**变更记录**
|
||||
|
@@ -111,7 +111,7 @@ fun <T> wait(data: ChannelData<T>, result: (value: T) -> Unit)
|
||||
#### wait [method]
|
||||
|
||||
```kotlin
|
||||
fun wait(key: String, result: () -> Unit)
|
||||
fun wait(key: String, callback: () -> Unit)
|
||||
```
|
||||
|
||||
**变更记录**
|
||||
|
@@ -575,7 +575,7 @@ injectMember {
|
||||
##### by [method]
|
||||
|
||||
```kotlin
|
||||
inline fun by(initiate: () -> Boolean): Result
|
||||
inline fun by(condition: () -> Boolean): Result
|
||||
```
|
||||
|
||||
**变更记录**
|
||||
@@ -593,7 +593,7 @@ inline fun by(initiate: () -> Boolean): Result
|
||||
##### onHooked [method]
|
||||
|
||||
```kotlin
|
||||
fun onHooked(initiate: (Member) -> Unit): Result
|
||||
fun onHooked(result: (Member) -> Unit): Result
|
||||
```
|
||||
|
||||
**变更记录**
|
||||
@@ -611,7 +611,7 @@ fun onHooked(initiate: (Member) -> Unit): Result
|
||||
##### onAlreadyHooked [method]
|
||||
|
||||
```kotlin
|
||||
fun onAlreadyHooked(initiate: (Member) -> Unit): Result
|
||||
fun onAlreadyHooked(result: (Member) -> Unit): Result
|
||||
```
|
||||
|
||||
**变更记录**
|
||||
@@ -627,7 +627,7 @@ fun onAlreadyHooked(initiate: (Member) -> Unit): Result
|
||||
##### onNoSuchMemberFailure [method]
|
||||
|
||||
```kotlin
|
||||
fun onNoSuchMemberFailure(initiate: (Throwable) -> Unit): Result
|
||||
fun onNoSuchMemberFailure(result: (Throwable) -> Unit): Result
|
||||
```
|
||||
|
||||
**变更记录**
|
||||
@@ -641,7 +641,7 @@ fun onNoSuchMemberFailure(initiate: (Throwable) -> Unit): Result
|
||||
##### onConductFailure [method]
|
||||
|
||||
```kotlin
|
||||
fun onConductFailure(initiate: (HookParam, Throwable) -> Unit): Result
|
||||
fun onConductFailure(result: (HookParam, Throwable) -> Unit): Result
|
||||
```
|
||||
|
||||
**变更记录**
|
||||
@@ -655,7 +655,7 @@ fun onConductFailure(initiate: (HookParam, Throwable) -> Unit): Result
|
||||
##### onHookingFailure [method]
|
||||
|
||||
```kotlin
|
||||
fun onHookingFailure(initiate: (Throwable) -> Unit): Result
|
||||
fun onHookingFailure(result: (Throwable) -> Unit): Result
|
||||
```
|
||||
|
||||
**变更记录**
|
||||
@@ -669,7 +669,7 @@ fun onHookingFailure(initiate: (Throwable) -> Unit): Result
|
||||
##### onAllFailure [method]
|
||||
|
||||
```kotlin
|
||||
fun onAllFailure(initiate: (Throwable) -> Unit): Result
|
||||
fun onAllFailure(result: (Throwable) -> Unit): Result
|
||||
```
|
||||
|
||||
**变更记录**
|
||||
@@ -775,7 +775,7 @@ inline fun result(initiate: Result.() -> Unit): Result
|
||||
#### by [method]
|
||||
|
||||
```kotlin
|
||||
inline fun by(initiate: () -> Boolean): Result
|
||||
inline fun by(condition: () -> Boolean): Result
|
||||
```
|
||||
|
||||
**变更记录**
|
||||
@@ -793,7 +793,7 @@ inline fun by(initiate: () -> Boolean): Result
|
||||
#### onPrepareHook [method]
|
||||
|
||||
```kotlin
|
||||
fun onPrepareHook(initiate: () -> Unit): Result
|
||||
fun onPrepareHook(callback: () -> Unit): Result
|
||||
```
|
||||
|
||||
**变更记录**
|
||||
@@ -807,7 +807,7 @@ fun onPrepareHook(initiate: () -> Unit): Result
|
||||
#### onHookClassNotFoundFailure [method]
|
||||
|
||||
```kotlin
|
||||
fun onHookClassNotFoundFailure(initiate: (Throwable) -> Unit): Result
|
||||
fun onHookClassNotFoundFailure(result: (Throwable) -> Unit): Result
|
||||
```
|
||||
|
||||
**变更记录**
|
||||
|
@@ -529,7 +529,7 @@ inline fun result(initiate: Result.() -> Unit): Result
|
||||
##### by [method]
|
||||
|
||||
```kotlin
|
||||
inline fun by(initiate: () -> Boolean): Result
|
||||
inline fun by(condition: () -> Boolean): Result
|
||||
```
|
||||
|
||||
**变更记录**
|
||||
@@ -543,7 +543,7 @@ inline fun by(initiate: () -> Boolean): Result
|
||||
#### onHookingFailure [method]
|
||||
|
||||
```kotlin
|
||||
fun onHookingFailure(initiate: (Throwable) -> Unit): Result
|
||||
fun onHookingFailure(result: (Throwable) -> Unit): Result
|
||||
```
|
||||
|
||||
**变更记录**
|
||||
|
@@ -29,7 +29,7 @@ inline fun events(initiate: YukiXposedEvent.() -> Unit)
|
||||
### onInitZygote [method]
|
||||
|
||||
```kotlin
|
||||
fun onInitZygote(initiate: (StartupParam) -> Unit)
|
||||
fun onInitZygote(result: (StartupParam) -> Unit)
|
||||
```
|
||||
|
||||
**变更记录**
|
||||
@@ -43,7 +43,7 @@ fun onInitZygote(initiate: (StartupParam) -> Unit)
|
||||
### onHandleLoadPackage [method]
|
||||
|
||||
```kotlin
|
||||
fun onHandleLoadPackage(initiate: (LoadPackageParam) -> Unit)
|
||||
fun onHandleLoadPackage(result: (LoadPackageParam) -> Unit)
|
||||
```
|
||||
|
||||
**变更记录**
|
||||
@@ -57,7 +57,7 @@ fun onHandleLoadPackage(initiate: (LoadPackageParam) -> Unit)
|
||||
### onHandleInitPackageResources [method]
|
||||
|
||||
```kotlin
|
||||
fun onHandleInitPackageResources(initiate: (InitPackageResourcesParam) -> Unit)
|
||||
fun onHandleInitPackageResources(result: (InitPackageResourcesParam) -> Unit)
|
||||
```
|
||||
|
||||
**变更记录**
|
||||
|
Reference in New Issue
Block a user