Explanation of the "itf" parameter to visit MethodInsn in ASM 5

With ASM 5, the original is MethodVisitor.visitMethodInsn()out of date. New parameter added itf. The API link says this means "if the class of the method owner is an interface."

But I think that it opcodeshould be INVOKEINTERFACE, and itfshould be true, if the owner is an interface, opcodeshould INVOKEVIRTUALand itfshould be false, if the owner is an ordinary class, itfit should always be deduced from opcode.

What is the point of the optional argument?

+4
source share
1 answer

ASM 5 Java 8, , invokestatic.

+3

Source: https://habr.com/ru/post/1546684/


All Articles