blob: 5ab34a7173bfd04addf2fdbc1ae714ecad789cb5 (
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
|
interface ILib { void run(); }
class UnmatchedCallSupertype implements ILib {
public static void main(String[] args) {
new UnmatchedCallSupertype().run();
}
public void run() {
System.err.println(this.toString());
System.err.println(this.toString());
System.err.println(this.toString());
System.err.println(this.toString());
}
}
aspect X {
pointcut runCall() : call(* ILib.*(..));
pointcut monitor() : call(String clone(String)) || runCall();
before() : monitor() {
System.err.println(thisJoinPointStaticPart.getSignature().getDeclaringType().getName());
}
}
class Client {
public static void main(String[] args) { new Lib().run(); }
static class Lib implements ILib { public void run() {} }
}
|