mirror of
https://github.com/eclipse-aspectj/aspectj.git
synced 2024-08-26 05:57:44 +02:00
30 lines
731 B
Java
30 lines
731 B
Java
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() {} }
|
|
}
|
|
|