feat: Improve some APIs

Some APIs have been slightly changed and docs have been added.

BREAKING CHANGE: Various APIs have been changed.
This commit is contained in:
oSumAtrIX
2024-10-27 05:28:25 +01:00
parent 5a0e3841ff
commit 00e5950cf2
6 changed files with 130 additions and 35 deletions

View File

@@ -12,6 +12,7 @@ import com.android.tools.smali.dexlib2.iface.ClassDef
import com.android.tools.smali.dexlib2.iface.DexFile
import com.android.tools.smali.dexlib2.iface.Method
import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction
import com.android.tools.smali.dexlib2.iface.reference.MethodReference
import com.android.tools.smali.dexlib2.iface.reference.StringReference
import lanchon.multidexlib2.BasicDexFileNamer
import lanchon.multidexlib2.DexIO
@@ -147,7 +148,7 @@ class BytecodePatchContext internal constructor(private val config: PatcherConfi
*
* @return A [MethodNavigator] for the method.
*/
fun navigate(method: Method) = MethodNavigator(this@BytecodePatchContext, method)
fun navigate(method: MethodReference) = MethodNavigator(this@BytecodePatchContext, method)
/**
* Compile bytecode from the [BytecodePatchContext].