David_W (70) [Avatar] Offline
#1
In 3.6.2, you indicate that cflowbelow 'Selects the same join points as the cflow(), except for the join points matching the specified pointcut.'

Actually, I believe that it only excludes the first match of the pointcut on the call stack.
For example,

class App {
public void testing(int depth) {
System.out.println("depth="+depth);
depth--;
if (depth>=0) {
testing(depth);
}
}
}

public aspect TestCflow {
public pointcut inTesting(): execution(* App.testing(int));

public pointcut inflow(): cflowbelow(inTesting()) && execution(* App.testing(int));

before():inflow() {
System.out.println("in cflow");
}
}

a call to App.testing(3) results in output
depth=3
in cflow
depth=2
in cflow
depth=1
in cflow
depth=0
ramnivas (171) [Avatar] Offline
#2
Re: clarification of cflowbelow
I will clarify this. Essentially, join point is a an execution of a program element. So two invocations of the same programming element are two different join points. But I see that the way it is written can be interpreted differently.

How about:
"Selects the same join points as the cflow(), except for the join point that initiated the control flow".

-Ramnivas
David_W (70) [Avatar] Offline
#3
Re: clarification of cflowbelow
Sounds good.