Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-dev] Runtime processing

Hi,

We have a use case for weaving aspects at runtime, and to that end I modified the AjBuildManager with an additional method:

byte[] weaveClassBytes(String className, byte[] classBytes)

In the current case, our system does this:

1) Calls the BuildManager with a normal batchBuild() call that only includes the aspects that we are going to add. 2) When our custom classloader loads a new class it calls weaveClassBytes() to add in the aspects defined.

Does anyone know if there is a problem with this? It seems to work quite well and I can see that it would be possible to make a simple launcher that runs programs this way so you could straightforwardly instrument a non-aspect aware application with a set of aspects.

I have implemented something similar. You might want to take a look at:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=31460

There is also a short discussion on that topic.

Best regards,
Martin

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature


Back to the top