Re: wondering ...

Jon Tirsén <[email protected]> Wed, 25 Feb 2004 11:45:24 +0100 (CET)
Newsgroups gmane.comp.java.nanning.devel
Message-ID <[email protected]>
Sure, that is common if you use mixins a lot. There's
a simple way of doing it in Nanning:
(MainObject) Aspect.getThis()

To explain:
If you have a mixin MyMixin and a main object
MainObject then in MyMixin you can do Aspect.getThis()
which will return you the currently executing proxy.
You can cast it both to MyMixin and MainObject.

It's possible in for example Dynaop too but the
mechanics are slightly different.

Hope this helps,
Jon

 --- roger menday <[email protected]> skrev: >=20
> Hi,=20
>=20
> Although, I am new to nanning (and AOP generally),
> recently I have read
> quite a bit, but cannot sufficiently answer one
> particular question ::
>=20
> I thinking how Mixins might help my coding ::  it
> seems to me that the
> Mixin would be useful (even without the AOP
> functionality), but I might
> need the Mixin to have access to the state of the
> object is it being
> MixedIn to. Is this something that is usual/
> supported, or am I barking
> up the wrong tree ?=20
>=20
> Roger
>=20
>=20
> _______________________________________________
> nanning-dev mailing list
> [email protected]
>
http://lists.codehaus.org/mailman/listinfo/nanning-dev=20

H=F6strusk och gr=E5 moln - k=F6p en resa till solen p=E5 Yahoo! Resor p=E5=
 adressen http://se.docs.yahoo.com/travel/index.html