@Override
public void visitMethodInsn(int opcode, String owner, String name,
String desc, boolean itf) {
String targetClassName = owner.replace('/', '.');
if (targetClassName.equals(org.evosuite.runtime.Random.class.getCanonicalName()) || !BytecodeInstrumentation.checkIfEvoSuitePackage(targetClassName)) {
if (opcode == Opcodes.INVOKESTATIC) {
this.purityAnalyzer.addStaticCall(classNameWithDots,
methodName, descriptor, targetClassName, name, desc);
} else if (opcode == Opcodes.INVOKEVIRTUAL) {
this.purityAnalyzer.addVirtualCall(classNameWithDots,
methodName, descriptor, targetClassName, name, desc);
} else if (opcode == Opcodes.INVOKEINTERFACE) {
this.purityAnalyzer.addInterfaceCall(classNameWithDots,
methodName, descriptor, targetClassName, name, desc);
} else if (opcode == Opcodes.INVOKESPECIAL) {
this.purityAnalyzer.addSpecialCall(classNameWithDots,
methodName, descriptor, targetClassName, name, desc);
}
}
super.visitMethodInsn(opcode, owner, name, desc, itf);
}
}