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
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
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.
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.
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
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
Hi Dustin,
I think it is probably just the case that there is no special handling for
dynamic proxies in there. I would be OK with making a change to recognize
the situation sooner and circumvent the unhelpful message. I'd need a
testcase before I could do the work myself but if you wanted to
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
Hi Andy and Dustin,
interesting that you stumbled upon the same issue as we did (see
http://forum.springsource.org/showthread.php?95314-ReflectionWorldExpression-when-upgrading-Aspectj).
If I understand your description right, you are also not only confronted with an
irritating error message but