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.

Driver.java 432B

123456789101112131415161718192021222324
  1. import org.aspectj.testing.Tester;
  2. public class Driver {
  3. public static void main(String[] args) { test(); }
  4. public static void test() {
  5. I i = new C4();
  6. Tester.checkEqual(i.m(), 42, "i.m()");
  7. }
  8. }
  9. interface I {}
  10. abstract class C1 implements I{}
  11. class C2 extends C1 implements I {}
  12. class C3 extends C1 {}
  13. class C4 extends C2 {}
  14. aspect Aspect {
  15. //introduction I {
  16. public int I.m() {return 42;}
  17. //}
  18. }