about PointCut selection and Context Parameter
?? 娑???濡? <[email protected]> Sat, 19 Apr 2003 04:55:28 +0000
| Newsgroups | gmane.comp.java.aspectwerkz |
|---|---|
| Message-ID | <[email protected]> |
Hi Jonas:
Aspectwerkz seems very different from other's aop frameworks. I think it is
"practical" AspectJ.
But I have some questions:
1.In AspectJ, you can select a PointCut by combine some conditions,and can
provide some parameters, such as:
pointcut setXY(FigureElement fe, int x, int y):
call(void FigureElement.setXY(int, int))
&& target(fe)
&& args(x, y);
around(FigureElement fe, int x, int y): setXY(fe, x, y) {
System.out.println(fe + " moved to (" + x + ", " + y + ").");
x++;
proceed(fe,x,y);
}
in this around advice, we can change x's value , and proceed to next
advice(or org method) with the new parameter.
But in Aspectwerk,jointpoint proceed() has no parameter.Is it means we
cannot change parameter like AspectJ?
2.How can I select PointCut by attribute(and combine with others)?
3.Would Aspectwerkz implement PreAdvice,PostAdvice and Around advice like
AspectJ?
Now in Aspectwerkz,every advice is around advice.
For example, can we just declare a PreAdvice in XML, and in this advice
class's execute method, we can just do our aspect thing,and need not to
invoke proceed method?
Best regards
shiyiying
_________________________________________________________________
享用世界上最大的电子邮件系统― MSN Hotmail。 http://www.hotmail.com
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf