Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » AJDT » Args evaluation in non-proceeding around()
Args evaluation in non-proceeding around() [message #61634] Fri, 03 February 2006 19:13
Eclipse User
Originally posted by: tommaso.netfluid.com

Hi all,

I would like to know if the AspectJ around() construct allows
to someway avoid evaluation of the actual method parameters
in the cases in which they are not needed.

What I would like to do is smth. like this: transform any call to

myObj.myMeth(arg1, arg2, ...);

into smth. like this:

if (condition) {
myObj.myMeth(arg1, arg2, ...);
}

Now, I would like to have the arguments arg1, arg2, ... *not*
even evaluated if the condition is false, so that this allows me
to leave the overhead (and side-effects) possibly introduced by such
parameter evaluation out of the program at all.

AFAICS, the current version of AspectJ evaluates the arguments anycase,
and it only allows me to skip the myMeth() call itself, but the
actual method parameters get evaluated (along with the possible side
effects caused by such evaluation).

For example, this could be applied in logging-like applications to avoid
the stringification of the arguments at all, whenever the configured log
level does not allow the message to be logged.

Many thanks in advance,

regards,

tom.
Previous Topic:add the aspectj nature in my plugin
Next Topic:Args evaluation in non-proceeding around()
Goto Forum:
  


Current Time: Fri Oct 24 11:28:14 GMT 2014

Powered by FUDForum. Page generated in 0.07114 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software