Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[ajdt-dev] How to get the caller's details for a execution pointcut?

Hi,

I have defined a pointcut of type execution for a method test() in a class ABC.

And I have defined a before-advice which is supposed to show the file name and line number of the caller programs which invoke this method ABC.test().

 

This is the advice code.

 

   static private void printParameters(JoinPoint jp) {

                   System.out.println("Source: " +jp.getSourceLocation());

}

 

However, this always displays the callee method details.

How can I get the caller’s details for a execution pointcut?

 

thanks,

arvind

-------------------------------------------------------------------------------------------------------------------------------------------------------------

 


Back to the top