On 2/6/07, Jun Wang <[EMAIL PROTECTED]> wrote:

Craig
Do you refer to http://dev.eclipse.org/mhonarc/lists/aspectj-dev/msg02152.html
, I am not sure why it is not helpful.


It isn't helpful because of my requirement that there be no build steps
(other than building a jar file to include the aspects and an aop.xml), to
the aspect, or to have to create the code for the pointcut library.  Please
correct me if my understanding is wrong.


Other solution in my mind would be first, specify pointcuts at interface
level,

public pointcut loggedGetOperations ()
execution (public void HttpServlet.doGet(HttpServletRequest,
HttpServletResponse)) ||
execution (public void HttpServlet.doPost(HttpServletRequest,
HttpServletResponse));

and enable LTW at class level.
..aop.xml..
<weaver>
<include within="foo.Servlet1 "/>
<include within="foo.Servlet2"/>
<include within="(@EnableWeave and bar.*) "/> <!-- Let user control their
serlvet by specify annotation.-->

see
http://www.eclipse.org/aspectj/doc/released/devguide/ltw-configuration.html#configuring-load-time-weaving-with-aopxml-files


Right, I've read that and this part:

"Only a simple abstract pointcut can be implemented i.e. a pointcut that
doesn't expose state (through args(), this(), target(), if()). In @AspectJ
syntax as illustrated in this sample, this means the method that hosts the
pointcut must be abstract, have no arguments, and return void."

concerns me, since I need to use "args".  Again, someone correct me if I'm
wrong, but that statement appears to be true since it isn't working for me.


Thanks
-- John (Jun Wang)


Thanks for the reply!

Cheers,
Craig
_______________________________________________
aspectj-users mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/aspectj-users

Reply via email to