Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Advice on Constructors With Subclasses

Simone,
Obviously, I agree with your assessment that something is missing here.

Thanks for your proof of concept, I'll give it a look and see if it
meets my needs, or if I should go with another approach.

I have posted an enhancement request here:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=246413

||------//~~~\\------==@<@>@==-----//~~~\\------||
|| J a m e s E l l i o t t ||
|| jvelliott@xxxxxxxxx ||
|| ||
||"Put yourself in their shoes before you ||
|| decide on the best way to take their shirts."||
|| -David Sklansky ||
||------\\~~~//------==@<@>@==-----\\~~~//------||



On Fri, Sep 5, 2008 at 9:58 AM, Andy Clement <andrew.clement@xxxxxxxxx> wrote:
>> I also stumbled upon this problem. In fact, I think AspectJ is missing
>> something here. There should be a way to say after "the object has been
>> completely initialized".
> My initial reaction without thinking through all details is that I agree
> there
> is something missing.  Feel free to raise an enhancement request to
> discuss it.
>
> cheers,
> Andy.
> 2008/9/4 Simone Gianni <simoneg@xxxxxxxxxx>
>>
>> Hi all,
>> I also stumbled upon this problem. In fact, I think AspectJ is missing
>> something here. There should be a way to say after "the object has been
>> completely initialized". That is because I might want to advice the
>> constructor of an abstract class and call abstract methods, which will
>> probably fail if the advice is executed after the abstract class
>> constructor instead of after the concrete class constructor. Using the
>> call instead of execution is a solution, but limited to the situation
>> where the aspects are consistently applied, which could not be the case
>> if I'm programming my own jar using AOP but then using it in a
>> non-aspectj system. In fact, using "execution", AspectJ will add the
>> code to my own classes, while using call requires the client code of my
>> library to be weaved.
>>
>> Simone
>>
>> Andrew Eisenberg wrote:
>> > Actually, it is the "call", not the "returning" that made it work.
>> > Should probably work with or without the "returning" clause.
>> >
>> > In AspectJ, super calls are not considered "calls" and so are not
>> > matched by the call designator, but the method bodies are executed,
>> > hence they *are* matched by the execution designator.
>> >
>> > On Tue, Sep 2, 2008 at 8:25 PM, James Elliott <jvelliott@xxxxxxxxx>
>> > wrote:
>> >
>> >> Thanks a lot. Guess I never tried the "returning" keyword.
>> >>
>> >> Much appreciated.
>> >> _______________________________________________
>> >> 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
>> >
>>
>>
>> --
>> Simone Gianni
>> http://www.simonegianni.it/
>> CEO Semeru s.r.l.
>> Apache Committer
>>
>> _______________________________________________
>> 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