aboutsummaryrefslogtreecommitdiffstats
path: root/org.aspectj.ajdt.core/testdata/src1/AroundA.java
blob: 8bc7b2f93f431025727872dccaeeb53a84102e1b (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
25
26
27
aspect AroundA {
	pointcut foo(): execution(void main(..));
	
	int around(int i, boolean b): args(i, b) && foo() {
		System.out.println("enter");
		return proceed(10, false);
	}
	
	
	void around(Object a): args(a) && foo() {
		System.out.println("enter");
		proceed("new: " + a);
		System.out.println("exit");
	}
	
	void around(final String[] a): args(a) && foo() {
		Runnable r = new Runnable() {
			public void run() {
				proceed(a);
			}
		};
		r.run();
		r.run();
	}
}