[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [aspectj-users] tracing static methods original caller.
- From: Gijs Peek <gijs.peek@xxxxxxxxx>
- Date: Wed, 30 Apr 2008 08:26:29 +0200
- Delivered-to: email@example.com
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references:in-reply-to:x-enigmail-version:openpgp:content-type:content-transfer-encoding; b=ddku18TrXY4BYW3anF66aGKHNdPEehJ3pgcTzn1UF25UxWoHQ21lU5AEpuZYL8pMLikZMYdpnHQQwhUJ6aNMGVIZi+Wlm4/SxSIm5Dp1tPAd4WzHzQJsX309ENzZ2uSwlGEeoniYEFOBbeuL3Zp/9Qtia2Qn8GK8v3O3mTpOVXs=
- Openpgp: id=E35F3B55
- User-agent: Thunderbird 126.96.36.199 (X11/20080227)
Hi Lei Lin,
You might want to take a look at the wormhole pattern in the 'AspectJ
in Action' book. I think that's what you are looking for.
- Gijs Peek
Lei Lin wrote:
> I have a problem to trace the static methods original caller. Here is
> the scenario
> Class A has a instance method B, which invokes a static method D of
> Class C. In the method D of C, invoke a static method F of Class E.
> Code likes the below. I use aspect to capture method F calling or
> execution. Assume that there are two instances (U and O) of Class A
> calling the method B in a multi-threads environment. When the aspect
> captures the method F calling, how can I tell which instance is
> calling method B so that method F is called. Is there a way that I can
> get the object instance of Class A? Thanks a lot.
> Class A
> C. methodD;
> Class C
> static methodD
> Class E
> static methodF
> aspectj-users mailing list