How to capture the parameters of System.out.println() in AspectJ's aspect and display in pointcut?

前端 未结 2 1712
[愿得一人]
[愿得一人] 2021-01-21 07:21

I am very new to AspectJ...just started to learn. Till now i am able to get the parameters of user defined method in my aspect and print the captured parameter in my pointcut.

2条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-21 07:39

    catch of method calls from JRE is not so easy.

    is easier to learn aspectj when you try to catch your own methods. Define your own println method perhaps in HelloClass and try again.

    for work with aspectj and jre classes you need to recompile jre classes with aspectj compiler.

    http://dev.eclipse.org/mhonarc/lists/aspectj-users/msg09350.html

提交回复
热议问题