[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[aspectj-users] Mixing post-compile and load-time weaving
|
I have a large application to which I am applying aspects using
post-compile weaving. The application generates some new classes at
run-time and loads them with its own class loader directly from a
bytcode array. I would also like to apply the same aspects to these
classes. I'm not entirely sure how to do this. I have used the -outxml
file to generate an aop.xml file but it seems very basic, e.g.,
<aspectj>
<aspects>
<aspect name="MyAspect"/>
</aspects>
</aspectj>
The documentation on load-time weaving isn't clear on what happens if
you mix post-compile weaved classes and load-time weaving. My hope would
be that the load-time weaver could avoid reweaving the already woven
classes but the flexibility that appears to available in aop.xml
suggests that this might be difficult. Ideally I would like the aop.xml
file to restrict load-time weaving to just the new classes that are
generated at runtime. Assuming that I can identify them with a
package/classname pattern perhaps the <weaver> tag can be used to
achieve this? I'd appreciate any clarification on my understanding of this.
Thanks
Mick Jordan