[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[List Home]
|
[aspectj-users] Small doubt on --> proceed(Object[] args)
|
- From: João Gonçalves <jocolimonada@xxxxxxxxx>
- Date: Sun, 6 Sep 2009 20:01:49 +0100
- Delivered-to: aspectj-users@eclipse.org
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=BHJxBfizC9LsDBhoFMv8KfDZIYOLJzT3ZX33IEqj1Ag=; b=JEIt8qA3Yx5VsqRJ0tXqNk8Q2mGa2djcNu9UNgeSIW8zcI1Juk9puFUJ6KYhdewlsk xY7kuimmMn20WnVWOFQiZQRrlC7EkWyalPhd6gyP+IBnw+l9Ob5ViLY1ZWQyWakqbJpY jZpIpASWxKmnE9/LTk3jjHPNjPKeJ5EpAEIhw=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=HevVvosGdVAvVs4l2lk6uyKG0eP+QPEFqxLy+aIoL+zWoEJbnA9rK9QqZhxUVgTATC qxbCmT5yxFq2vjoOYanycVNxmtBkS+iUTwYwuJKMpxWKTmhYz+rhGrVBNL9bkvTiQkI9 sUeexE/jt5amjAsTVS/2fXghe7is8tmtxRi9w=
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?)