开发者

instrumenting an "import" using java asm library

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜