Hi,
We already have preGoal and postGoal (same as before() and after() AOP
advice). That's good .... but not enough ... :-)
I think it would be great if we could provide the around() advice too.
It means the ability to decide whether or not you want the real goal to
execute or not. You can do stuff before the goal, execute the goal and
work on the result.
In aspectj, you would write for example:
Object around() : somePointcut()
{
// perform something before the goal here
// (optional) call the method we're trapping. If you want to
completely
// replace the method, simply omit the proceed() call.
Object result = proceed();
// perform something after the goal here
return result;
}
Transposing this in jelly/werkz, it would mean the ability to completely
replace a given goal. For example, in the Clover plugin, I could trap
the java:compile goal and replace it with a version using the clover
compiler, etc. (obviously, I would only do this if clover is enabled for
the project).
How hard would it be to add :
- a <aroundGoal name="existing goal name"> tag
- a <proceed> tag in jelly/werkz that could be used from within the
<aroundGoal> to decide whether or not to execute the "existing goal
name" goal
?
Thanks
-Vincent
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>