summaryrefslogtreecommitdiffstats
path: root/tests/jsrc/FindShowError.java
blob: 39fe6258ddf95c27368d1e4cc6b0009e0c88314f (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
import org.aspectj.compiler.base.ast.*;



aspect Wins {

	pointcut showError(ASTObject ast, String msg): target(ast) && call(void showError(msg));

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

aspect Loses {
	
	pointcut showError(ASTObject ast, String msg): 
            within(org.aspectj.compiler..*) && target(ast) && call(void AST.showError(msg));
	
	void around(ASTObject ast, String msg): showError(ast, msg) {
		System.out.println("hi");
		proceed(ast, msg);
	}
}