Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [aspectj-users] creating a pointcut for primitive operations

Hi, Andrew.
 
In usual AspectJ you cannot match on such primitive operations. Having said that, you can easily write an extension to the open AspectBench Compiler (www.aspectbench.org). This is an open compiler framework for AspectJ. There you can easily write a new pointcut matching on those operations and then use an advice to intercept/replace them.
 
Eric
 
--
Eric Bodden
Sable Research Group
McGill University, Montréal, Canada

________________________________

From: aspectj-users-bounces@xxxxxxxxxxx on behalf of Andrew Elegante
Sent: Mon 06.02.2006 17:16
To: aspectj-users@xxxxxxxxxxx
Subject: [aspectj-users] creating a pointcut for primitive operations



Hi,

 

I'm sort of an AOP newbie but I had a question related to creating pointcuts which are not specifically for methods.  The issue here is that java decimal arithmetic is NOT entirely accurate due to rounding so when you do something like 33 * 100 you get 329.999999945.  What I'd like to be able to do is look for a pattern of x * y  and replace it with roundIt(x*y).  Does this sort of functionality exist or does anyone have a better idea?

 

Drew



Back to the top