You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi. I am using the following code to retrieve the method code.
private long checkMethodCode(String tempFname, List classMethodMemberList)
{
Iterator sampleMethodIter = classMethodMemberList.iterator();
long warnCnt = 0;
StringBuffer messSB = new StringBuffer("");
while (sampleMethodIter.hasNext())
{
MethodTree methodTreeObj = (MethodTree) sampleMethodIter.next();
String methodName = methodTreeObj.getName().toString();
String bodyText = methodTreeObj.getBody().toString();
this works fine but I am unable to map the bodyText to the line numbers for the same lines ** in the original source file. ** I appreciate that the lines are being reconstructed
I want to be able to read an exception's stack trace e.g. packageX.classY.methodZ(classY.java:234) and then display the block of lines around line 234.
Currently I can't see how to map the getBody() output to the line numbers.
The line numbers get out of sync if the source code has comments in it because the JD library doesn't seem to account for them
I know that the JD-GUI can do this because it can show it in the front-end
Thanks
The text was updated successfully, but these errors were encountered:
Hi. I am using the following code to retrieve the method code.
private long checkMethodCode(String tempFname, List classMethodMemberList)
{
Iterator sampleMethodIter = classMethodMemberList.iterator();
long warnCnt = 0;
StringBuffer messSB = new StringBuffer("");
while (sampleMethodIter.hasNext())
{
MethodTree methodTreeObj = (MethodTree) sampleMethodIter.next();
String methodName = methodTreeObj.getName().toString();
String bodyText = methodTreeObj.getBody().toString();
this works fine but I am unable to map the bodyText to the line numbers for the same lines ** in the original source file. ** I appreciate that the lines are being reconstructed
I want to be able to read an exception's stack trace e.g. packageX.classY.methodZ(classY.java:234) and then display the block of lines around line 234.
Currently I can't see how to map the getBody() output to the line numbers.
The line numbers get out of sync if the source code has comments in it because the JD library doesn't seem to account for them
I know that the JD-GUI can do this because it can show it in the front-end
Thanks
The text was updated successfully, but these errors were encountered: