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.

CflowBinding.java 897B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. // for Bugzilla Bug 34858
  2. // Weaver crash w/ coverage
  3. import org.aspectj.testing.Tester;
  4. public class CflowBinding {
  5. public static void main(String[] args) {
  6. new Bar().bar(10);
  7. }
  8. static aspect A {
  9. pointcut flow(int i, Object o): cflow(execution(void bar(int)) && this(o) && args(i));
  10. Object around() : call(void m()) && flow(int, Object) {
  11. return proceed();
  12. }
  13. Object around(final int i) : call(void m()) && flow(i, Object) {
  14. System.out.println("i: " + i);
  15. return proceed(i);
  16. }
  17. Object around(final Object o) : call(void m()) && flow(int, o) {
  18. System.out.println("o: " + o);
  19. return proceed(o);
  20. }
  21. Object around(final Object o, final int i) : call(void m()) && flow(i, o) {
  22. System.out.println("o: " + o + ", i: " + i);
  23. return proceed(o, i);
  24. }
  25. }
  26. }
  27. class Bar {
  28. void bar(int i) {
  29. m();
  30. }
  31. void m() {
  32. System.out.println("m");
  33. }
  34. }