[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [aspectj-users] How to retrieve a parent argument.
|
Hi Laurent!
Unfortunately I am not sure I have been able to completely follow your
mail, so I will try adding some additional questions:
1/ you need to decide if the m2 call should happen according to the
parameter passed to m1?
if this is the case than I guess you need a percflow aspect that is doing
i/ a m1 before advice to retrieve the m1 parameter
ii/ a m2 around advice that is using the previous step value to
determine if the proceed() is called.
2/ this object can be retrieved using this(variable) in your PCD.
hth,
./alex
--
.w( the_mindstorm )p.
On 11/3/05, Laurent Burgy <burgy@xxxxxxxxxx> wrote:
> Hi all,
>
> maybe it's really simple but i didn't know how to do...
>
> if i have:
>
> public void m1( int foo ) {
>
> m2();
> m3();
>
> }
>
> If i want to do something around m2 considering the value of foo, how
> may i do it?
>
> public void m1( int foo) {
>
> if( foo < 42 )
> titi.m2();
> else
> toto.m4();
>
> tutu.m3();
> }
>
> How can i retrieve the value of foo or a reference to it ?
> In the same time, how can I retrieve a reference to the current object (
> the one to which "this" refers in the m1 method ) ?
>
>
>
> Regards,
>
> PS: Sorry for my english
>
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>