码迷,mamicode.com
首页 > 编程语言 > 详细

java AOP Before, After, AfterReturning, AfterThrowing, or Around 注解

时间:2019-04-19 19:52:36      阅读:153      评论:0      收藏:0      [点我收藏+]

标签:tle   ann   win   des   adk   cad   hat   wing   sibling   

 

https://www.eclipse.org/aspectj/doc/next/adk15notebook/ataspectj-pcadvice.html

Advice

In this section we first discuss the use of annotations for simple advice declarations. Then we show how thisJoinPoint and its siblings are handled in the body of advice and discuss the treatment of proceed in around advice.

Using the annotation style, an advice declaration is written as a regular Java method with one of the Before, After, AfterReturning, AfterThrowing, or Around annotations. Except in the case of around advice, the method should return void. The method should be declared public.

A method that has an advice annotation is treated exactly as an advice declaration by AspectJ‘s weaver. This includes the join points that arise when the advice is executed (an adviceexecution join point, not a method execution join point).

java AOP Before, After, AfterReturning, AfterThrowing, or Around 注解

标签:tle   ann   win   des   adk   cad   hat   wing   sibling   

原文地址:https://www.cnblogs.com/frankyou/p/10738287.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!