mirror of
https://github.com/ReVanced/revanced-patcher.git
synced 2024-11-10 01:02:22 +01:00
feat: add MutableMethod.getInstructions
extension function
This commit is contained in:
parent
1790f0d706
commit
fae4029cfc
1 changed files with 6 additions and 0 deletions
|
@ -323,4 +323,10 @@ object InstructionExtensions {
|
|||
*/
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
fun <T> MutableMethod.getInstruction(index: Int): T = implementation!!.getInstruction<T>(index)
|
||||
|
||||
/**
|
||||
* Get the instructions of a method.
|
||||
* @return The instructions.
|
||||
*/
|
||||
fun MutableMethod.getInstructions(): MutableList<BuilderInstruction> = implementation!!.instructions
|
||||
}
|
Loading…
Reference in a new issue