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.

B.java 588B

123456789101112131415161718192021222324252627282930
  1. package p;
  2. public class B {
  3. public B() {
  4. }
  5. public static void main(String[] argv) {
  6. B b = new B();
  7. b.sayhi();
  8. b.sayhi();
  9. b.sayhi();
  10. if (!a.X.hasAspect(A.class)) {
  11. throw new RuntimeException("hasAspect(A.class) should return true");
  12. }
  13. if (!a.X.hasAspect(B.class)) {
  14. throw new RuntimeException("hasAspect(B.class) should return true");
  15. }
  16. if (a.X.hasAspect(q.D.class)) {
  17. throw new RuntimeException("hasAspect(D.class) should return false");
  18. }
  19. }
  20. public void sayhi() { System.err.println("hi from B"); }
  21. }