Java annotation to execute some code before and after method

前端 未结 2 1131
再見小時候
再見小時候 2020-12-10 04:25

I\'m writing an swing app and i\'d like to have \'wait\' cursor when some methods are executed. We can do it this way:

public void someMethod() {
    MainUI         


        
2条回答
  •  盖世英雄少女心
    2020-12-10 05:07

    You might want to look at using around() advice in AspectJ in conjunction with your annotation to associate the around() advice with all methods that are qualified with your annotation.

提交回复
热议问题