org.aspectj/tests/bugs/IncorrectXlintOnInterface.java
aclement ef7885fd12 Some more fix for Bugzilla Bug 60015
NPE, Incorrect XLint:unmatchedSuperTypeInCall warning
2004-08-03 14:53:38 +00:00

30 рядки
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() {} }
}