| java.lang.Object org.apache.tools.ant.Location
Location | public class Location implements Serializable(Code) | | Stores the location of a piece of text within a file (file name,
line number and column number). Note that the column number is
currently ignored.
|
Constructor Summary | |
public | Location(String fileName) Creates a location consisting of a file name but no line number or
column number.
Parameters: fileName - The name of the file. | public | Location(Locator loc) Creates a location from the SAX locator using the system ID as
the filename. | public | Location(String fileName, int lineNumber, int columnNumber) Creates a location consisting of a file name, line number and
column number.
Parameters: fileName - The name of the file. |
UNKNOWN_LOCATION | final public static Location UNKNOWN_LOCATION(Code) | | Location to use when one is needed but no information is available
|
Location | public Location(String fileName)(Code) | | Creates a location consisting of a file name but no line number or
column number.
Parameters: fileName - The name of the file. May be null ,in which case the location is equivalent toLocation.UNKNOWN_LOCATION UNKNOWN_LOCATION. |
Location | public Location(Locator loc)(Code) | | Creates a location from the SAX locator using the system ID as
the filename.
Parameters: loc - Must not be null . since: Ant 1.6 |
Location | public Location(String fileName, int lineNumber, int columnNumber)(Code) | | Creates a location consisting of a file name, line number and
column number.
Parameters: fileName - The name of the file. May be null ,in which case the location is equivalent toLocation.UNKNOWN_LOCATION UNKNOWN_LOCATION. Parameters: lineNumber - Line number within the file. Use 0 for unknownpositions within a file. Parameters: columnNumber - Column number within the line. |
equals | public boolean equals(Object other)(Code) | | Equality operation.
Parameters: other - the object to compare to. true if the other object contains the same informationas this object. since: Ant 1.6.3 |
getColumnNumber | public int getColumnNumber()(Code) | | the column number since: Ant 1.7 |
getFileName | public String getFileName()(Code) | | the filename portion of the location since: Ant 1.6 |
getLineNumber | public int getLineNumber()(Code) | | the line number since: Ant 1.6 |
hashCode | public int hashCode()(Code) | | Hash operation.
a hash code value for this location. since: Ant 1.6.3 |
toString | public String toString()(Code) | | Returns the file name, line number, a colon and a trailing space.
An error message can be appended easily. For unknown locations, an
empty string is returned.
a String of the form "fileName:lineNumber: " if both file name and line number are known,"fileName: " if only the file name is known,and the empty string for unknown locations. |
|
|