Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [aspectj-users] super call joinpoints?

Sorry to be slow, but how do these arguments apply to super calls of normal
methods?

Regarding "before" advice on super constructor calls, is that not just like
"before" on preinitialization (which is allowed)? It should not be possible
to access the object instance from the corresponding advice, of course, so
the "this" value in thisJoinPoint is null - again by analogy with
preinitialization. [The same applies equally to "this" constructor calls
as it does to super constructor calls.]

I can see that it is a little tricky to implement before advice on super
constructor calls when weaving into source and get valid Java. So perhaps,
like handler joinpoints were included because they were easy to do at source
level, super constructor calls were outlawed because they were hard on
source, back in the days when AspectJ was still implemented via source
transformation? 

Let me know what I'm overlooking here!


> -----Original Message-----
> From: aspectj-users-bounces@xxxxxxxxxxx [mailto:aspectj-users-
> bounces@xxxxxxxxxxx] On Behalf Of Gregor Kiczales
> Sent: 27 April 2006 18:14
> To: aspectj-users@xxxxxxxxxxx
> Subject: RE: [aspectj-users] super call joinpoints?
> 
> Oege de Moor said:
> >
> > Why aren't super calls joinpoints (be it to methods or constructors)?
> >
> 
> As I recall, it's the goal of having an orthogonal join point model that
> excludes super calls as join points.
> 
> For the dynamic JPM to be orthogonal in the sense I mean, any kind of
> advice
> should work with any kind of JP (and any kind of pointcut). But since
> super
> calls in constructors must come first, it wouldn't be possible for before
> advice to work with super call join points.
> 
> The other example of this problem is handler join points. (I suspect that
> if
> we had been doing byte code weaving all along we might never have added
> them
> to the language.)
> 
> IMHO, having the JPM not be orthogonal really reduces the idea of
> abstraction in named pointcuts, since when you write advice you have to
> consider what kind the JPs might actually be, rather than just writing to
> a
> named pointcut abstraction.
> 
> 
> 
> > -----Original Message-----
> > From: aspectj-users-bounces@xxxxxxxxxxx
> > [mailto:aspectj-users-bounces@xxxxxxxxxxx] On Behalf Of Oege de Moor
> > Sent: Wednesday, April 26, 2006 3:04 AM
> > To: aspectj-users@xxxxxxxxxxx
> > Subject: [aspectj-users] super call joinpoints?
> >
> >
> > Why aren't super calls joinpoints (be it to methods or constructors)?
> >
> >
> >
> > _______________________________________________
> > 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