aboutsummaryrefslogtreecommitdiffstats
path: root/tests/java5/generics/genericaspects/AnonymousPointcutInGenericAspect.aj
blob: d8dabf7fbb8fdb9ec621d9fafd6bd9d3e53f0b4d (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
28
abstract aspect SuperAspect<T> {
	
	before() : execution(* *(T)) {
		System.out.println("I matched at " + thisJoinPointStaticPart);
	}
	
}

public aspect AnonymousPointcutInGenericAspect extends SuperAspect<String> {
	
	public static void main(String[] args) {
		C c = new C();
		c.foo("well i never");
		c.bar(5);
	}
	
}

class C {
	
	// should be matched
	public void foo(String s) {}
	
	// should not be matched
	public void bar(Number n)  {}
	
	
}