Local Variables in AspectJ

丶灬走出姿态 提交于 2019-12-12 02:22:51

问题


I'm implementing an invariants extension to the java language. I'm implementing the parser for my new language and annotated AST as an intermediate representation. Now I'm thinking of using AspectJ to control where to inject code in a visit to AST to control the variables but I detect a problem. AspectJ doesn't have a joinpoint to local variables. Is there any extension to aspectj or other aspect programming framework with this functionality?

Regards


回答1:


Local variable access is not exposed as a joinpoint in AspectJ, and I do not know of any extension to AspectJ to do that.

Maybe lower-level bytecode instrumentation libraries like ASM could be helpful in your case. With ASM you can work on JVM byte code level.



来源:https://stackoverflow.com/questions/15799623/local-variables-in-aspectj

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!