Re: [aspectj-users] Selecting arithmetic operation join points. Is it possible?

2013-01-10 Thread M. P.
I suppose we should continue this in another thread. Hi,   Why don't you create some developer documentation so that it's easier for people to help you. I think you know what I'll say here: time. I'll try

Re: [aspectj-users] Selecting arithmetic operation join points. Is it possible?

2013-01-08 Thread M. P.
Hi Andy, thanks for your answer. I spent a couple of hours looking at the weaver source code yesterday. At first it seemed relatively clear how to detect arithmetic instructions but when I continued I realized that adding a join point is going to be a shotgun surgery. Apparently you're the only

Re: [aspectj-users] Selecting arithmetic operation join points. Is it possible?

2013-01-08 Thread Andy Clement
Hi, Why don't you create some developer documentation so that it's easier for people to help you. I think you know what I'll say here: time. I'll try and find some to improve the situation - there are docs (e.g. http://www.eclipse.org/aspectj/doc/released/faq.php#q:buildingsource ) but they

[aspectj-users] Selecting arithmetic operation join points. Is it possible?

2013-01-07 Thread M. P.
Hi, The subject pretty much says it all. For example I'd like to be able to select integer subtraction: Integer i = 5; Integer j = 2; Integer r = i - j; Maybe if Java supported operator overloading that would be fairly easy. 1. So is something like this possible now? I'm pretty sure it is

Re: [aspectj-users] Selecting arithmetic operation join points. Is it possible?

2013-01-07 Thread Alexander Kriegisch
For example I'd like to be able to select integer subtraction: Integer i = 5; Integer j = 2; Integer r = i - j; Maybe if Java supported operator overloading that would be fairly easy. 1. So is something like this possible now? I'm pretty sure it is not. You are right, it is not

Re: [aspectj-users] Selecting arithmetic operation join points. Is it possible?

2013-01-07 Thread M. P.
For example I'd like to be able to select integer subtraction: Integer i = 5; Integer j = 2; Integer r = i - j; Maybe if Java supported operator overloading that would be fairly easy. 1. So is something like this possible now? I'm pretty sure it is not.

Re: [aspectj-users] Selecting arithmetic operation join points. Is it possible?

2013-01-07 Thread Alexander Kriegisch
There is no operator overloading in Java. It is implemented in other JVM languages like Scala, but this is a bit off-topic here. BTW, I did not say it was impossible, just that it will probably never happen in AspectJ. ;) What you show is normal method interception, not operator interception.

Re: [aspectj-users] Selecting arithmetic operation join points. Is it possible?

2013-01-07 Thread M. P.
There is no operator overloading in Java. It is implemented in other JVM languages like Scala, but this is a bit off-topic here. BTW, I did not say it was impossible, just that it will probably never happen in AspectJ. ;) What you show is normal method interception, not operator

Re: [aspectj-users] Selecting arithmetic operation join points. Is it possible?

2013-01-07 Thread Alexander Kriegisch
Maybe you should have a look into other bytecode instrumentation frameworks such as BCEL, if you need to work on such a low level of granularity. The effort should be justifiedmfor you if you do have a real world use case and cannot solve it in another way. Good luck! Alexander Kriegisch Am

Re: [aspectj-users] Selecting arithmetic operation join points. Is it possible?

2013-01-07 Thread Andy Clement
The arithmetic instructions could be surfaced as join points. e.g. iadd/isub/dadd/lsub/etc. Join points are really just a manifestation of a bytecode instruction. However, these instructions operate on the stack and AspectJ does not track who put what on the stack, so in the pointcut/advice you