Skip to main content

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 #592090] Fri, 03 February 2006 19:13
Eclipse UserFriend
Originally posted by:

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,


Previous Topic:Args evaluation in non-proceeding around()
Next Topic:compiler not copying .xml file to output folder
Goto Forum:

Current Time: Sat Jun 23 06:52:56 GMT 2018

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

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

Back to the top