aboutsummaryrefslogtreecommitdiffstats
path: root/tests/hasmember/HasMethod.aj
blob: dc1bb3eb7ffb3736d9b86497ebcb1ca76c9180f4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
public aspect HasMethod {
	
	declare parents : hasmethod(* print(..)) implements Printable; 

	public static void main(String[] args) {
		C c = new C();
		if (! (c instanceof Printable)) {
			throw new RuntimeException("declare parents : hasmethod failed");
		}
	}
}

class C {
	
	public void print() {}
	
}

interface Printable {};