Hooking an existing method in Java

前端 未结 5 1436
清歌不尽
清歌不尽 2021-02-19 14:08

I want to hook the method System.out.print in Java and have the ability to read/change the variables used in the method before the part of the method is called that actually add

5条回答
  •  梦谈多话
    2021-02-19 14:36

    @Nowayz Some time before i too had the same problem with me. After some research i came to know About AOP. AOP i.e. AspectJ provides a facility to intercept the java APIs by applying the pointcuts before,after, around. So have a look at it .You can refer my question on stack .it may help you.

提交回复
热议问题