Balaji,
I must emphasize that with perthis()/pertarget() there is essentially no difference between LTW and weaving at any other stage and nor should there be. Firstly the type(s) used should be available for weaving (source for compile-time, -inpath for binary and defined by a weaving class loader for load-time weaving) and secondly the type should be woven by the aspect that declares the per-clause. The second point is an issue for LTW if you have an aspect defined locally to your application that tries to use perthis() for a type that belongs to a framework or middleware environment which is not exposed to that aspect.
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, [EMAIL PROTECTED]
http://w3.hursley.ibm.com/~websterm/
| "Wes" <[EMAIL PROTECTED]>
Sent by: [EMAIL PROTECTED] 26/09/2006 16:41 |
|
"A class loader may only weave classes that it defines. It may not
weave classes loaded by a delegate or parent class loader."
http://www.eclipse.org/aspectj/doc/released/devguide/ltw-rules.html
I.e., the code controlled during LTW is the set of classes defined
by the weaving class loader.
Wes
> ------------Original Message------------
> From: G Balaji <[EMAIL PROTECTED]>
> To: [email protected]
> Date: Tue, Sep-26-2006 7:11 AM
> Subject: [aspectj-users] Requesting more info on Implementation Notes about perthis (compile-time vs. load-time weaving)
>
> Dear AspectJ Experts,
>
> From the AspectJ's programming guide's implementation notes [found at
> http://www.eclipse.org/aspectj/doc/released/progguide/implementation.html ] :
>
> "Aspects that are defined perthis or pertarget also have restrictions
> based on control of the code. In particular, at a join point where the
> bytecode for the currently executing object is not available, an aspect
> defined perthis of that join point will not be associated. So aspects
> defined perthis(Object) will not create aspect instances for every
> object unless Object is part of the compile. Similar restrictions apply to
> pertarget aspects. "
>
> In the context of the above statement, if we examine the following
> statement-fragment:
>
> "..aspects defined perthis(Object) will not create aspect instances for
> every object unless Object is part of the compile..".
>
> how is this statement affected when load-time weaving is used instead
> of (or, in addition to) compile-time weaving?
>
> Thanks,
> G Balaji.
> _______________________________________________
> aspectj-users mailing list
> [email protected]
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>
_______________________________________________
aspectj-users mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/aspectj-users
_______________________________________________ aspectj-users mailing list [email protected] https://dev.eclipse.org/mailman/listinfo/aspectj-users
