Gopinathan Balaji wrote:
> Try:
> 
> aspect a {
>  pointcut a2CalledFromA1():
>    cflow(execution(void A.a1())) && call(void A.a2());
>}

Thanks for the reply, Balaji.

Sorry, for not being complete enough with my sample code.
I'd like the pointcut to only pick out direct calls to a2() from a1(),
excluding any calls to a2() further down in a1()'s control flow.
The class actually looks more like this:

class A {
  void a1() {
    a2(); // this should be picked out
    someMethodThatCallsA2FurtherDownTheCallChain(); // should exclude
calls to a2 from this and other control flows below a1
  }

  void a2() {
  }

}


marko

_______________________________________________
aspectj-users mailing list
aspectj-users@eclipse.org
https://dev.eclipse.org/mailman/listinfo/aspectj-users

Reply via email to