[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[aspectj-users] Re: [NEWSDELIVER] Re: Load Time Weaving AspectJ 5
- From: Matthew Webster <matthew_webster@xxxxxxxxxx>
- Date: Tue, 14 Mar 2006 11:03:36 +0000
- Delivered-to: email@example.com
- Importance: Normal
If you want your aspects to only affect
certain classes or certain methods within those classes then you should
be writing pointcuts. The aop.xml specification is not designed to meet
the needs of AOP. However in your situation if you don't want to use a
particular aspect use an "exclude" clause in the "aspects"
section; this will apply to all classes. If you don't want to weave a particular
set of classes use an "exclude" clause in the "weaver"
section; this will apply to all aspects. If you want to pick and choose
combinations of aspects and class or selection certain methods then use
Java Technology Centre, MP146
IBM Hursley Park, Winchester, SO21 2JN, England
Telephone: +44 196 2816139 (external) 246139 (internal)
Email: Matthew Webster/UK/IBM @ IBMGB, matthew_webster@xxxxxxxxxx
Re: Load Time Weaving AspectJ 5
I have run my example when separating the apsects and java classes into
two projects, and I could exclude weaving classes of a specific package.
I mean that by using the following aop.xml:
<?xml version="1.0" encoding="UTF-8"?>
No apsect has been weaven to classes of the package "monPack".
But I want to specify the method or the class to exclude!
Thus, when I tried with:
<exclude within="test.Hello.sayHello(..)"/> or <exclude
that dosent work!
The same thing when I use <exclude within="monPAck.MonAspect1"/>,
expected to not weave the aspect MonAspect1 to any class. It still be
Is it normal? Has anyone tried to do the same? Thank you fir your help.