Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [aspectj-dev] weaving information via messages

> -----Original Message-----
> From: Martin Lippert [mailto:lippert@xxxxxxx]
. . .
> Before I start looking at it just a short question: I use only the weaving
> part,
> as you know, for my load-time weaving for the Eclipse system. Therefore I
> weave
> class per class. And I need the structure information for after each
> single
> class that is woven. Do you think it would be possible to use the
> structure
> model for this kind of single-class-weaving?
> 
> If so, what do I have to do to set up and reset the structure model for
> the
> weaver/world? (Because I do not use the real compiler or builder parts)

Since you're only after simple dependency information you should be able to
ignore the structure model and just mimic the way that it gets that
information from the weaver.  The easiest way to do this is probably by
modifying the org.aspectj.weaver.Shadow.implementMungers() method.  Note how
it calls AsmAdaptor.noteMunger(..) with a shadow and a munger.  You can
refer to the way that AsmAdaptor uses this info to generate the crosscutting
dependencies.  A better way to do that would be to subclass AsmAdaptor.  But
for that you'll need to extract a super class that's decoupled from
StructureModel and get rid of AsmAdaptor's static methods.

Mik





Back to the top