blob: 1949ed6dc2f5a003fe981ffe4214949485e144a3 (
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
29
30
31
32
33
34
35
36
37
|
class A {
void m() {
System.out.println("A");
}
}
class B extends A {
void m() {
System.out.println("B");
}
}
aspect FunkyPointcut {
after(A a, B b) returning:
call(* foo(*,*)) &&
(args(b,a) || args(a,b)) {
System.out.println("Woven");
}
}
public class PR61658 {
public static void foo(A a, A b) {
a.m();
b.m();
}
public static void main(String[] args) {
A a = new A();
B b = new B();
foo(b,a);
}
}
|