Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Programmatic access to classes that were "aspected"

Cheers Matt, that seems to have worked well. I get all the "weaverinfo" messages and chop them up so I end up with the class names, which is exactly what I needed. Thankyou!

On 01/11/2006, at 8:46 PM, Matthew Webster wrote:


Tim,

If you use the -showWeaveInfo option the compiler will tell you which classes have been advised. If you combine this with a custom message handler then you will have programmatic access to the information. Use the -XmessageHandlerClass: option.

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/



Tim Pokorny <tim@xxxxxxxxxxxxxxxxxx>
Sent by: aspectj-users-bounces@xxxxxxxxxxx

01/11/2006 04:56

Please respond to
aspectj-users@xxxxxxxxxxx

To
aspectj-users@xxxxxxxxxxx
cc
Subject
[aspectj-users] Programmatic access to classes that were "aspected"





Hello all,

I'm currently working on an application that takes POJO's and allows  
them to work in a distributed simulation environment. I'm using  
AspectJ to intercept certain events (such as field modifications) and  
send that information out to the other simulation components. My  
question is this:

Is there any way to gain programmatic access to the names of those  
classes that have been the subject of weaving via the ajc tool?

I've created a wrapper "compiler" class that generates a command line  
invokes the main method of "org.aspectj.tools.ajc.Main". Following  
this, I'd like to get a list of all those classes that ajc modified  
and then do some post-processing on them (I use reflection to  
generate some other simulation-specific build artefacts.

I'm sure this is possible, but thus far the AspectJ codebase has  
overwhelmed me somewhat and I'm on a tight deadline :(

Thanks for any help anyone can provide!
Cheers,
Tim Pokorny
_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users

_______________________________________________
aspectj-users mailing list


Back to the top