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.

CaseR.java 595B

123456789101112131415161718192021222324252627
  1. // TESTING: testing a pure marker interface - no methods added
  2. import org.aspectj.lang.annotation.*;
  3. public class CaseR {
  4. public static void main(String[]argv) {
  5. CaseR cr = new CaseR();
  6. System.out.println(cr instanceof I);
  7. System.out.println(cr instanceof J);
  8. }
  9. }
  10. aspect X {
  11. @DeclareMixin(value="CaseR",interfaces={I.class})
  12. public static C createImplementation1() {return null;}
  13. }
  14. interface I {}
  15. interface J {}
  16. class C implements I,J {
  17. public void foo() {
  18. System.out.println("foo() running");
  19. }
  20. public void goo() {
  21. System.out.println("goo() running");
  22. }
  23. }