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.

Example.java 496B

1234567891011121314151617181920212223242526272829
  1. import java.lang.annotation.*;
  2. aspect X {
  3. declare parents:
  4. @SomeAnnotation(a = @Foo) * implements java.io.Serializable;
  5. }
  6. @SomeAnnotation(a = @Foo)
  7. public class Example {
  8. public static void main(String []argv) {
  9. Example e = new Example();
  10. if (e instanceof java.io.Serializable) {
  11. System.out.println("yes");
  12. } else {
  13. System.out.println("no");
  14. }
  15. }
  16. }
  17. @Retention(RetentionPolicy.RUNTIME)
  18. @interface Foo {}
  19. @Retention(RetentionPolicy.RUNTIME)
  20. @interface SomeAnnotation {
  21. Foo a();
  22. }