Re: [aspectj-users] How to resolve real execution signature for call joinpoint

2014-05-26 Thread Alexander Kriegisch
Actually and unfortunately, contrary to your assumption Signature.getDeclaringType() does not yield the same type as thisJoinPoint.getTarget().getClass(). That isn't exactly what I was saying. I was saying this new method you wanted to add, how would its return value differ from

Re: [aspectj-users] How to resolve real execution signature for call joinpoint

2014-05-23 Thread Andy Clement
Actually and unfortunately, contrary to your assumption ​ ​ Signature.getDeclaringType() does not yield the same type as ​ ​ thisJoinPoint.getTarget().getClass(). That isn't exactly what I was saying. I was saying this new method you wanted to add, how would its return value differ from

[aspectj-users] How to resolve real execution signature for call joinpoint

2014-05-22 Thread Alexander Kriegisch
On StackOverflow I saw an interesting question. Even though I (user kriegaex) have answered it as good as I could at http://stackoverflow.com/questions/23791760/aspectj-separating-native-library-calls-from-application-calls/23799457#23799457, I am still wondering if there might be a way to find

Re: [aspectj-users] How to resolve real execution signature for call joinpoint

2014-05-22 Thread Andy Clement
I can't immediately think of a way to do that. Even if using an if() clause on the point cut to insert a runtime test, that test can't tell whose method is running on the object you have (whether it is a local one or an inherited one). You can't even inspect the stack trace in the advice (which

Re: [aspectj-users] How to resolve real execution signature for call joinpoint

2014-05-22 Thread Alexander Kriegisch
Okay, so you had the same thoughts ('if' pointcut and stacktrace check) as I and also the same results. We would need something like a sneek peek towards method resolution which happens just an instant later, but not quite at the call site. BTW, this was one of my experimental pointcuts:

Re: [aspectj-users] How to resolve real execution signature for call joinpoint

2014-05-22 Thread Alexander Kriegisch
An afterthought: As for Signature.getDeclaringTypeName(), the acceptance criteria do not seem to involve Am 23.05.2014 um 00:55 schrieb Alexander Kriegisch alexan...@kriegisch.name: Okay, so you had the same thoughts ('if' pointcut and stacktrace check) as I and also the same results.

Re: [aspectj-users] How to resolve real execution signature for call joinpoint

2014-05-22 Thread Alexander Kriegisch
(Argh, I accidentally sent this one to early, next try. I am sorry.) An afterthought: As for Signature.getDeclaringTypeName(), the acceptance criteria do not seem to involve dynamic method resolution, only static code analysis (what is the target's declared type?). Would it be possible to

Re: [aspectj-users] How to resolve real execution signature for call joinpoint

2014-05-22 Thread Andy Clement
I had a further thought about this problem whilst out on a run, I can imagine (although I haven't coded it up) something around and if() clause and using reflection with target.class.getDeclaredMethod(thisJoinPoint stuff in here) (and walking up the hierarchy) to check where the method is actually