Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [aspectj-users] Requesting more info on Implementation Notesaboutperthis (compile-time vs. load-time weaving)

>When you say "can't use load-time weaving to support perthis(Object).", I
>understand it to mean : perthis for a pointcut which evaluates _this_
> specifically to java.lang.Object, and not:
>perthis for a pointcut which evaluates _this_ to any Java object.
Yes, I did mean the instantiation for perthis(Object)

>I think in the referenced Implementation Notes, "perthis(Object)" was used
>in the second sense above - that is, Object being any Java object.

>Is my understanding correct?

In the referenced implementation notes it meant perthis(Object) in the same
sense, i.e., to match any Object generically. As such, it's normal to use
perthis(SomeType) where SomeType is some more specific type that you are
weaving into. 

I wanted to clarify that load-time weaving won't allow you to use a blanket
perthis(Object) to match all objects...

HTH,
Ron

----- Original Message ----
From: Ron Bodkin <rbodkin@xxxxxxxxxxxxxx>
To: aspectj-users@xxxxxxxxxxx
Sent: Tuesday, September 26, 2006 1:47:34 PM
Subject: RE: [aspectj-users] Requesting more info on Implementation Notes
aboutperthis (compile-time vs. load-time weaving)


To add to Wes' answer, it's important to note that AspectJ load-time weaving
doesn't support weaving into the bootstrap loader, even when use a Java
agent like Java 5's java agent. Weaving into the bootstrap loader would
raise a number of issues), so you can't use load-time weaving to support
perthis(Object). There has been some discussion of the issues involved in
the Eclipse bugzilla bug #149261

-----Original Message-----
From: aspectj-users-bounces@xxxxxxxxxxx
[mailto:aspectj-users-bounces@xxxxxxxxxxx] On Behalf Of G Balaji
Sent: Tuesday, September 26, 2006 7:10 AM
To: aspectj-users@xxxxxxxxxxx
Subject: [aspectj-users] Requesting more info on Implementation Notes
aboutperthis (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
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users

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



Back to the top