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 433B

1234567891011121314151617181920
  1. // HasMethod with anno value matching
  2. @interface I {
  3. Class i();
  4. }
  5. aspect A {
  6. declare parents: hasmethod(@I(i=String.class) * *(..)) implements java.io.Serializable;
  7. }
  8. public class B {
  9. @I(i=String.class) public void m() {}
  10. public static void main(String []argv) {
  11. B b = new B();
  12. if (!(b instanceof java.io.Serializable)) throw new IllegalStateException("");
  13. }
  14. }
  15. class C {
  16. @I(i=Integer.class) public void m() {}
  17. }