Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] LTW examples

Compiling an aspect takes ajc, i.e., org.aspectj.tools.ajc.Main,
as documented in the devguide section on ajc.

Weaving binary aspects into .class files can also be done programmatically
via org.aspectj.tools.ajc.Main.

LTW requires that the aspects be defined before any classes are loaded.

Aside from launching with LTW enabled, you could create a custom class 
loader programmatically and load programs with it.  This is what the 
AspectJ test harness does, using WeavingURLClassLoader.  For the source, 
see the FAQ entry on point.

Wes

> ------------Original Message------------
> From: Stalsy <stalsy@xxxxxxxxx>
> To: aspectj-users@xxxxxxxxxxx
> Date: Wed, Oct-4-2006 8:14 AM
> Subject: [aspectj-users] LTW examples
>
> Hi all,
> 
> do you know where can I get any LTW concrete examples based on 
> org.aspectj.weaver.tools.* API, please? In particularly  I'm looking 
> for 
> an example that compile and weave an aspect created after my program is 
> 
> launched if exists.
> 
> EX: I launch my java program, create a file "example.aj" ( an aspect ) 
> and than I would weave that aspect into my program ( or just compile it 
> 
> ). This allow me to create custom aspect at runtime.
> 
> thanks to all, best regards
> 
> -- 
> Stalsy
> 
>   HomePage   --:. http://www.stalsy.it
>   Blog       --:. http://blog.stalsy.com
>   Public Key --:. http://www.stalsy.it/key.php
>   E-Mail     --:. stalsy@xxxxxxxxx
>   ICQ        --:. 302346155
>   MSN        --:. faricci@xxxxxxxx
> 
> 
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
> 



Back to the top