in bytekit-core/src/main/java/com/alibaba/bytekit/asm/location/filter/InvokeContainLocationFilter.java [43:66]
private MethodInsnNode findMethodInsnNode(AbstractInsnNode insnNode) {
AbstractInsnNode current = insnNode;
while (current != null) {
current = current.getNext();
if (current instanceof MethodInsnNode) {
MethodInsnNode methodInsnNode = (MethodInsnNode) current;
if (methodInsnNode.owner.equals(this.owner) && methodInsnNode.name.equals(this.methodName)) {
return methodInsnNode;
}
}
}
current = insnNode;
while (current != null) {
current = current.getPrevious();
if (current instanceof MethodInsnNode) {
MethodInsnNode methodInsnNode = (MethodInsnNode) current;
if (methodInsnNode.owner.equals(this.owner) && methodInsnNode.name.equals(this.methodName)) {
return methodInsnNode;
}
}
}
return null;
}