[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[aspectj-users] cflow or something like that
|
hi,
how do i solve the following situation
i have two class
class A{public void executeA(){...}}
class B{public void executeB(){...}}
what i want to do is to get the execution
of B.executeB but only if its called
by A. the problem thou is that executeB
is never directly called by A thou its
somewhere in the callstack.
i trid all possible poitcut combinations
but luck sofar
here an example
pointcut test():
call(public void B.executeB())
&& ( cflowbelow(within(A))
|| cflow(within(A))
|| within(A)
|| cflowbelow(call(* A.(*)))
|| cflow(call(* A.(*)))
)
&& if(true);
so basically what i want is something like this
pointcut test():
call(public void B.executeB())
&& incallstack(call(* A.*(*)));
well the solution is easy enough. i can parse
the callstack in the advise for the pointcut
call(public void B.executeB()) myself. but i was somehow
under the impression i could do that in a more declarative
way.
any suggestions?
ciao robertj