[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[aspectj-users] Slow if()
- From: Marijn Meijles <marijn@xxxxxxxxxx>
- Date: Thu, 3 Jul 2008 11:50:42 +0200
- Delivered-to: firstname.lastname@example.org
I have a problem with my around advice. The advice itself is really
slow because it does all kind of reflection stuff and needs access to
this (the current aspected instance). However, it should only run
about 1% of the time and that depends on the return value of a
getter on this. Now my question is: how do I tell AspectJ to only run
the advice and do all kinds of time consuming stuff if the value from
the getter is not null?
I tried a pointcut with "... && this(entity) && if()" whereby the
method body returns "entity.getParent() != null" but this doesn't
help, probably because the ProceedingJoinPoint is created for the
@Pointcut method as well.
Any help would be greatly appreciated.
This line says this line says