Skip to content

Commit

Permalink
Update 4_apis.md
Browse files Browse the repository at this point in the history
  • Loading branch information
oSumAtrIX authored Oct 27, 2024
1 parent f338ebf commit 242e244
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/4_apis.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ A handful of APIs are available to make patch development easier and more effici

#### 👹 `proxy(ClassDef)`

By default, the classes are immutable, meaning that they cannot be modified.
By default, the classes are immutable, meaning they cannot be modified.
To make a class mutable, use the `proxy(ClassDef)` function.
This function creates a lazy mutable copy of the class definition.
Accessing the property will replace the original class definition with the mutable copy,
Expand Down Expand Up @@ -52,11 +52,11 @@ execute {
// stop() returns the mutable copy of the method.
val method = navigate(someMethod).at(2) { instruction -> instruction.opcode == Opcode.INVOKEVIRTUAL }.stop()

// Alternatively to stop(), you can delegeate the method to a variable.
// Alternatively, to stop(), you can delegate the method to a variable.
val method by navigate(someMethod).at(1)

// You can chain multiple calls to at() to navigate deeper into the method.
val method = navigate(someMethod).at(1).at(2, 3, 4).at(5).stop()
val method by navigate(someMethod).at(1).at(2, 3, 4).at(5)
}
```

Expand All @@ -72,7 +72,7 @@ execute {
}
```

The `delete` function can be used to mark files for deletion when the APK is rebuilt.
The `delete` function can mark files for deletion when the APK is rebuilt.

```kt
execute {
Expand Down

0 comments on commit 242e244

Please sign in to comment.