Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] tracing static methods original caller.

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
     {
          .....;
     }
}


Back to the top