Browse Source

Expose filename and linecount of location

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@274839 13f79535-47bb-0310-9956-ffa450edef68
master
Peter Reilly 22 years ago
parent
commit
25e76768e8
1 changed files with 17 additions and 0 deletions
  1. +17
    -0
      src/main/org/apache/tools/ant/Location.java

+ 17
- 0
src/main/org/apache/tools/ant/Location.java View File

@@ -130,6 +130,22 @@ public class Location implements Serializable {
this.columnNumber = columnNumber;
}

/**
* @return the filename portion of the location
* @since Ant 1.6
*/
public String getFileName() {
return fileName;
}

/**
* @return the line number
* @since Ant 1.6
*/
public int getLineNumber() {
return lineNumber;
}

/**
* Returns the file name, line number, a colon and a trailing space.
* An error message can be appended easily. For unknown locations, an
@@ -156,4 +172,5 @@ public class Location implements Serializable {

return buf.toString();
}

}

Loading…
Cancel
Save