Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] how to find the end-of-method line number?

You should probably use thisJoinPointStaticPart.getSourceLocation().

-Ramnivas

On Sun, Sep 5, 2010 at 11:58 PM, Hagai Cibulski <hagaic@xxxxxxxxx> wrote:

The following turns out to be too slow:

(and probably might be incorrect with certain compiler optimizations)

 

      after(): methodUnderTestExecution() {

StackTraceElement stackTraceElement = Thread.currentThread().getStackTrace()[2];

int returnLineNumber = stackTraceElement.getLineNumber();

                        …

 

Hagai


_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users



Back to the top