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.

ThisJoinPointAssignments.java 460B

1234567891011121314151617181920
  1. public class ThisJoinPointAssignments {
  2. public static void main(String[] args) {
  3. new ThisJoinPointAssignments().realMain(args);
  4. }
  5. public void realMain(String[] args) {
  6. new C().f();
  7. org.aspectj.testing.Tester.check(A.jp != null, "Didn't set the JoinPoint");
  8. }
  9. }
  10. class C {
  11. public void f() {}
  12. }
  13. aspect A {
  14. static org.aspectj.lang.JoinPoint jp;
  15. before(): call(void C.f()) {
  16. jp = thisJoinPoint;
  17. }
  18. }