aboutsummaryrefslogtreecommitdiffstats
path: root/org.aspectj.ajdt.core/testdata/src1/Trace.java
blob: d6aaf17f86aa269f31f13ecc1f93f74ab5005c77 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
public abstract aspect Trace {
	public abstract pointcut traced(Object o);
	
	before (Object exc): traced(exc) {
		System.out.println("enter: " /*+ thisJoinPoint.getSignature()*/);
	}
	
    Object around(): execution(* doit(..)) {
    	Object exc = "Hi";
    	System.out.println("start around: " + exc);
    	Object ret = proceed();
    	System.out.println("exiting around with: " + ret);
    	return ret;
    }
    
     Object around(Object exc): traced(exc) {
    	System.out.println("start around(2): " + exc);
    	Object ret = proceed(exc);
    	System.out.println("exiting around with(2): " + ret);
    	return ret;
    }
}