Right, I see what you're saying. There is nothing special , as in
possessing some kind of built in signifier, about being the first
modified method entered from an unmodified method. Unmodified methods
just sort of don't exist in that universe at all.
So that being the case, it is also a true statement that that cflow
cannot give you the actual stack trace since a stack trace could enter
and exit -via jumping into and out of the native method stack,, at any
time and there's no special way using AspectJ to know that just
happened .
I have to do a little begging here. I still have that goal; I was hoping
AspectJ would have a trick up its sleve but i see now why it can't
provide that, it's a very reasonable limitation .. and here[s the
begging part... does anyone have any glimmering of an idea how that
might be done despite no longer qualifying as an aspectJ question ? I
hope I am not being inappropriate at this point.
Many thanks due to all who answered.
Sincerely...
On 03/27/2014 12:45 PM, Frank Pavageau wrote:
It's difficult to know that you're going through an unmodified method
without modifying the method.
I guess you could maintain a (thread-local) stack of the methods
called (by using a call(* *(..)) pointcut) and verifying in the weaved
methods (using a execution(* *(..)) pointcut) that it matches the
expected call. However, there would be several shortcomings:
* you wouldn't detect calls that never result in a weaved method
call, but that doesn't seem to be your concern anyway
* you'd have to deal with polymorphism since the signature you see
at the call join point
<http://www.eclipse.org/aspectj/doc/released/adk15notebook/join-point-signatures.html#method-call-join-point-signatures>
is not always the same as the one you see at the execution join
point
<http://www.eclipse.org/aspectj/doc/released/adk15notebook/join-point-signatures.html#method-execution-join-point-signatures>
You'd also have to evaluate the performance impact of intercepting
each call.
Frank
2014-03-27 15:37 GMT+01:00 trhouse <trho...@gmail.com
<mailto:trho...@gmail.com>>:
If I could know when the program had entered a non instrumented
method,that would suffice since I could just throw a global flag
of some description, though thinking about it now, that's a lot of
flag checking I'm setting myself up for...
It seems like a very basic fact about any program utilizing
aspectj -now we have left instrumented code, now we are reentrant.
AspectJ does not support this scenario? Can anyone confirm that
statement?
Thank you!
On Mar 26, 2014 12:29 AM, "Andy Clement" <andrew.clem...@gmail.com
<mailto:andrew.clem...@gmail.com>> wrote:
cflow() and cflowbelow() are the usual tools for detecting
something calling some other thing - but that seems like
targeting that you don't want to do. In the advice you could
create a stack trace (using Thread) and inspect it to see who
called you but the performance wouldn't be great.
Andy
On 25 March 2014 11:55, JAVA DEVELOPER
<java_developer_...@gmx.com
<mailto:java_developer_...@gmx.com>> wrote:
Suppose I have program in which some method calls are
targeted by a pointcut, while others are not. Of course a
targeted method could be invoked by a non-targeted method.
What I want to know is when this has happened. I (think) I
know that I cant get the invoking, non-targeted method's
FQN without targeting it, (but I would take it if I could
have it).. what I am interested in is knowing the fact
that this has occurred at all. Is this possible?
Thank you!
-T
_______________________________________________
aspectj-users mailing list
aspectj-users@eclipse.org <mailto:aspectj-users@eclipse.org>
https://dev.eclipse.org/mailman/listinfo/aspectj-users
_______________________________________________
aspectj-users mailing list
aspectj-users@eclipse.org <mailto:aspectj-users@eclipse.org>
https://dev.eclipse.org/mailman/listinfo/aspectj-users
_______________________________________________
aspectj-users mailing list
aspectj-users@eclipse.org <mailto:aspectj-users@eclipse.org>
https://dev.eclipse.org/mailman/listinfo/aspectj-users
_______________________________________________
aspectj-users mailing list
aspectj-users@eclipse.org
https://dev.eclipse.org/mailman/listinfo/aspectj-users
_______________________________________________
aspectj-users mailing list
aspectj-users@eclipse.org
https://dev.eclipse.org/mailman/listinfo/aspectj-users