You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

IncorrectXlintOnInterface.java 731B

1234567891011121314151617181920212223242526272829
  1. interface ILib { void run(); }
  2. class UnmatchedCallSupertype implements ILib {
  3. public static void main(String[] args) {
  4. new UnmatchedCallSupertype().run();
  5. }
  6. public void run() {
  7. System.err.println(this.toString());
  8. System.err.println(this.toString());
  9. System.err.println(this.toString());
  10. System.err.println(this.toString());
  11. }
  12. }
  13. aspect X {
  14. pointcut runCall() : call(* ILib.*(..));
  15. pointcut monitor() : call(String clone(String)) || runCall();
  16. before() : monitor() {
  17. System.err.println(thisJoinPointStaticPart.getSignature().getDeclaringType().getName());
  18. }
  19. }
  20. class Client {
  21. public static void main(String[] args) { new Lib().run(); }
  22. static class Lib implements ILib { public void run() {} }
  23. }