blob: ac3fd5cc6ee1a2e920df4f8813504b1695658da7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
import org.aspectj.lang.Signature;
import org.aspectj.lang.JoinPoint;
public abstract aspect World {
//private Object result;
pointcut greeting() : execution(* Hello.sayWorld(..));
Object around(): greeting() {
System.out.println("around start!");
Object result = proceed();
System.out.println("around end!");
return result;
}
// before() : greeting() {
// Signature signature = thisJoinPoint.getSignature();
// System.out.println("before " + signature.getName());
// }
// after() returning () : greeting() {
// Signature signature = thisJoinPoint.getSignature();
// System.out.println("after " + signature.getName());
// }
}
|