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.

DAMethod2.java 605B

1234567891011121314151617181920212223242526272829
  1. import java.lang.annotation.*;
  2. @Retention(RetentionPolicy.RUNTIME)
  3. @interface Annot {}
  4. @Retention(RetentionPolicy.RUNTIME)
  5. @interface Foo {}
  6. class Person {
  7. @Foo
  8. public void foo() {}
  9. @Foo
  10. public boolean bar() {return false;}
  11. @Foo
  12. public String getString() { return null; }
  13. @Foo
  14. public boolean isSet() { return false; }
  15. @Foo
  16. public void isNotReturningBoolean() { }
  17. public void getin() {}
  18. }
  19. aspect DAMethod2 {
  20. declare @method: !(* *.get*()) && !(* aspectOf(..)) && !(* hasAspect(..)): @Annot;
  21. declare @method: !@Foo * *(..) && !(* aspectOf(..)) && !(* hasAspect(..)): @Annot;
  22. }