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.

NonStaticInnerInterfaces_PR386.java 593B

12345678910111213141516171819202122232425262728293031
  1. import org.aspectj.testing.*;
  2. public class NonStaticInnerInterfaces_PR386 {
  3. public static void main(String[] args) {
  4. A a = new A();
  5. A.I ab = new C();
  6. C c = new C();
  7. a.go();
  8. ab.go();
  9. c.go();
  10. Tester.checkAllEvents();
  11. }
  12. static {
  13. Tester.expectEventsInString("A0,C1,C2,");
  14. }
  15. }
  16. class B {
  17. static int j = 0;
  18. }
  19. class A {
  20. public interface I { void go(); }
  21. public void go() { Tester.event("A" + (B.j++)); }
  22. }
  23. class C extends A implements I {
  24. public void go() { Tester.event("C" + (B.j++)); }
  25. }