[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[aspectj-users] Re: [NEWSDELIVER] Scoping of weaved classes per aspect in aop.xml?
|
Barry,
Please take a look at the load-time
weaving documentation: http://www.eclipse.org/aspectj/doc/released/devguide/ltw.html.
You can achieve what you want with the "concrete-aspect" aop.xml
element. You just have to supply the abstract super-aspect.
Matthew Webster
AOSD Project
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
http://w3.hursley.ibm.com/~websterm/
To:
undisclosed-recipients:;
cc:
Subject:
[NEWSDELIVER]
Scoping of weaved classes per aspect in aop.xml?
I would like to scope the classes considered for weaving for aspects
defined in aop.xml.
I have an aspect is targeting a very specific hunk of code in a
thirdparty library, say package "com.foo.stuff..*". But I also
have
other aspects declared in aop.xml that I never want to weave into
classes in that package.
As far as I can tell, I can only include/exclude weaving per all aspects
in the aop.xml. Is this correct, or is there some way to say something
like:
<aspectj>
<aspects>
<aspect name="org.opentrader.infra.foo.MyAspect>
<weaver>
<include within="foo.bar..*"/>
<!-- for for this aspect -->
</weaver>
</aspect>
...
</aspects>
<weaver options="-verbose -showWeaveInfo">
<include within="com.opentrader..*"
/> <!-- for all aspects -->
<!-- Note, I never want any other aspects
to weave into foo.bar..* -->
</weaver>
</aspectj>