findTarget

fun MethodNode.findTarget(failIfNotFound: Boolean = true, block: BlockAssembly.() -> Unit): InsnTarget(source)

Find a sequence of instructions matching the assembly returned by block in this method's instructions.

Return

an operational implementation of InsnTarget, or a NOOP implementation if the target can not be found and failIfNotFound is false

Parameters

failIfNotFound

throw an exception if the target can not be found

block

the instruction assembly

See also


fun InsnList.findTarget(failIfNotFound: Boolean = true, block: BlockAssembly.() -> Unit): InsnTarget(source)

Find a sequence of instructions matching the assembly returned by block in this InsnList.

Return

an operational implementation of InsnTarget, or a NOOP implementation if the target can not be found and failIfNotFound is false

Parameters

failIfNotFound

throw an exception if the target can not be found

block

the instruction assembly

See also


fun InsnList.findTarget(insns: InsnList, failIfNotFound: Boolean = true): InsnTarget(source)

Find a sequence of instructions matching insns in this InsnList.

Return

an operational implementation of InsnTarget, or a NOOP implementation if the target can not be found and failIfNotFound is false

Parameters

insns

the InsnList to search in

failIfNotFound

throw an exception if the target can not be found

See also