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.

EachObjectNoThis.java 442B

1234567891011121314151617181920212223
  1. import org.aspectj.testing.Tester;
  2. public class EachObjectNoThis {
  3. public static void main(String[] args) {
  4. new C().foo();
  5. }
  6. }
  7. class C {
  8. public void foo() {
  9. }
  10. }
  11. aspect A /*of eachobject(!instanceof(Object))*/ {
  12. {
  13. // This doesn't appy
  14. //Tester.checkFailed("this aspect shouldn't exist");
  15. }
  16. before(): !target(Object) && call(* *(..)) {
  17. Tester.checkFailed("this aspect shouldn't exist");
  18. }
  19. }