Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Load-Time Weaving / Annotations / Example


Franz,

I am interested to know why you are declaring annotations then matching on them rather simply matching using pointcuts. I can see 2 use cases. Firstly you have another program that "consumes" annotations but  either do not  want to or cannot add the annotations to the source code. Secondly you have another aspect that just matches on annotations and you want to add them using the first aspect with having to change the source code.

Why do you want to write a custom class loader? If you are using Java 5 then you can use the Java agent supplied. If you have JDK 1.4 then you can use the "aj" script (see aspectj1.5/doc/examples/ltw).

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/

Please respond to reitinger.franz@xxxxxxxxx; Please respond to aspectj-users@xxxxxxxxxxx

Sent by:        aspectj-users-bounces@xxxxxxxxxxx

To:        <aspectj-users@xxxxxxxxxxx>
cc:        
Subject:        [aspectj-users] Load-Time Weaving / Annotations / Example


Hi all,

I'm using the power of annotations to decorate the things belonging to a
concern. To be more flexible I use the declaring mechnaism to describe the
patterns for the annotations, f.i. declare @method : public * *.*myMethods()
: @MyAnnotation; This works fine for all ressources which are compiled
within a project (compile-time weaving).

Now I want to use this mechanism for objects which are loaded on demand by
an url based classloader. I've read some documentation concerning the
load-time weaving and I would prefer the usage of a custom class loader. Has
anybody succeeded in using this approach for decorating classes/methods
during the loading by a classloader?

thanX
franzR


_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users


Back to the top