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<http://www.eclipse.org/aspectj/doc/released/adk15notebook/index.html>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?)
_______________________________________________
aspectj-users mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/aspectj-users

Reply via email to