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.

ReferringToPointcutsInAspect_PR316.java 487B

1234567891011121314151617181920
  1. import org.aspectj.testing.Tester;
  2. public class ReferringToPointcutsInAspect_PR316 {
  3. public static void main(String[] args) {
  4. new C().f();
  5. Tester.checkAllEvents();
  6. }
  7. static {
  8. Tester.expectEvent("void-f");
  9. Tester.expectEvent("before-f");
  10. }
  11. }
  12. class C {
  13. public void f() { Tester.event("void-f"); }
  14. }
  15. aspect A /*of eachobject(i())*/ {
  16. pointcut i(): target(C);
  17. before(): i() && execution(* f(..)) { Tester.event("before-f"); }
  18. }