Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-dev] Getting source code positions for advice

I'm trying to extract source file information during the weaving process. I wrote the following code to fetch the beginning and end of an advice:

public String getAdviceFormatString(BcelAdvice adv)
{
ISourceLocation pos = adv.getSourceLocation(); int startLine = pos.getLine();
    int endLine = pos.getEndLine(); // do the rest
}


I always get that startLine == endLine which correspond to the first line of the advice declaration. What am I doing wrong here?





Back to the top