aboutsummaryrefslogtreecommitdiffstats
path: root/tests/other-systems/ajc-src/FindShowError.java
blob: 49ed8f4bdcb012dbce8891b8a958aed5baa31a86 (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
import org.aspectj.compiler.base.ast.*;



aspect Wins {

	pointcut showError(ASTObject ast, String msg):
            within(org.aspectj..*) && target(ast) && args(msg) && call(void showError(String));

	void around(ASTObject ast, String msg): showError(ast, msg) {
		System.out.println("hi");
		proceed(ast, msg);
	}
}

aspect Loses {
	
	pointcut showError(ASTObject ast, String msg):
            target(ast) && args(msg) && call(void showError(String));
	
	void around(ASTObject ast, String msg): showError(ast, msg) {
		System.out.println("hi");
		proceed(ast, msg);
	}
}