I am working on some analysis of class files, and I am working on using ASM to read classes. In Javap, the operation code and tagName and tagValue are printed inline, but in each AbstractInsnNode I see only fields for int (and not tagValue)
for(AbstractInsnNode abstractInsnNode : instructionList) { System.out.println("\tOpcode: " + + abstractInsnNode.getOpcode() + " type: " + abstractInsnNode.getType()); }
How to get instructions from ASM, for example:
5: invokeinterface
And in the case of loading strings and constants, etc. I also need access to these values. This usually comes from tagValue javap. I just don't need to print them, I also need programmatic access to the values.
I need access to the basic operation information, for example, these fields:
jvmOperations": [{ "byteOffset": 0, "constantPoolIndex": null, "opCode": 42, "opCodeName": "aload_0", "type": null, "tagName": null, "tagValue": null }, { "byteOffset": 1, "constantPoolIndex": null, "opCode": 180, "opCodeName": "getfield", "type": null, "tagName": "Field", "tagValue": "val$foo:Lcom/example/graph/demo/Foo;" }, { "byteOffset": 4, "constantPoolIndex": null, "opCode": 182, "opCodeName": "invokevirtual", "type": null, "tagName": "Method", "tagValue": "com/example/graph/demo/Foo.doSomething:()Ljava/lang/Integer;" }, { "byteOffset": 7, "constantPoolIndex": null, "opCode": 176, "opCodeName": "areturn", "type": null, "tagName": null, "tagValue": null }]