开发者

instrumenting an "import" using java asm library

开发者 https://www.devze.com 2023-01-30 08:45 出处:网络
I\'m using the asm library for java instrumentation and I want t开发者_如何学JAVAo instrument an \"import\"

I'm using the asm library for java instrumentation and I want t开发者_如何学JAVAo instrument an "import" instruction. so that by using visitMethodInsn and INVOKEVIRTUAL i would be able to call a function from my package. I'm aware that when I have a bytecode the linkage stage is over so I might have trouble doing so. any solution/detour?


byte code uses full package.class names. There is no "import" equivelents at the byte code level. If you want to import a class, just use its fully qualified name.

0

精彩评论

暂无评论...
验证码 换一张
取 消