public static AbstractInsnNode findInstruction ( MethodNode method , InsnList matches , int index ) { AbstractInsnNode node = method . instructions . get ( index ) ; AbstractInsnNode match = matches . getFirst ( ) ; while ( node != null ) { if ( insnEqual ( node , match ) ) { AbstractInsnNode m = match . getNext ( ) ; AbstractInsnNode n = node . getNext ( ) ; while ( m != null && n != null && insnEqual ( m , n ) ) { m = m . getNext ( ) ; n = n . getNext ( ) ; } if ( m == null ) return node ; } node = node . getNext ( ) ; } return null ; }
Finds instruction a specific instruction list inside a method starting from the specified index .