Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] Small doubt on --> proceed(Object[] args)

Here's a small working example:

@Pointcut("execution(public void figures.Point.move(int, int))"
         + "&& this(p) && args(dx, dy)")
void movingPoint(int dx,
int dy, Point p) {}

@Around("movingPoint(dx, dy, p)")
public void doNothing(ProceedingJoinPoint thisJoinPoint,
        
int dx, int dy, Point p) throws Throwable {
   thisJoinPoint.proceed( new Object[]{p, dx, dy} );
}


The above snippet works without any problem, but, from the explanation of the AspectJ 5 Developer's Notebook I got the idea that the correct Object[] argument should be:

new Object[]{p, dx, dy, p}

p - from "this()"
dx, dy, p - all the arguments expected at the join point (or p isn't considered an argument expected at the join point?)

Back to the top