[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[List Home]
|
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: aspectj-users@eclipse.org
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:user-agent:mime-version:to:subject:references:in-reply-to:x-enigmail-version:openpgp:content-type:content-transfer-encoding; bh=IsfSUOdtx4yUTfTm2uZHnrQcj5Jmon96+zE9FdaLEvI=; b=SQZdQIIebCc6Pgl8oqfmfVqotlqdU/XwDE6KnEpJo4gVEv4gZQ0LVia1rERQnuhiR9i0aCqFeutSmsp3nVOvo3ehqI9s8ndk0s6rdTsjhuFeRcalYn27GEkmIpojLk/jdw2XoV0DcweWsDhtMnvSieBRdiUIF9zMY2e5qfYv4Yo=
- 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 2.0.0.12 (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.
cheers,
- Gijs Peek
Lei Lin wrote:
> Hi,
>
> 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
> {
> methodB
> {
> C. methodD;
> }
> }
>
> Class C
> {
> static methodD
> {
> E.methodF;
> }
> }
>
> Class E
> {
> static methodF
> {
> .....;
> }
> }
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users