Package org.codehaus.commons.compiler
Class Location
java.lang.Object
org.codehaus.commons.compiler.Location
- All Implemented Interfaces:
Serializable
Immutable representation of the location of a character in a document, as defined by an (optional) file name, a
line number and a column number.
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
NOWHERE
Representation of an unspecified location. -
fileName
-
lineNumber
private final int lineNumber -
columnNumber
private final int columnNumber
-
-
Constructor Details
-
Location
- Parameters:
fileName
- A human-readable indication where the document related to thisLocation
can be found
-
-
Method Details
-
getFileName
- Returns:
- The "file name" associated with this location, or
null
-
getLineNumber
public int getLineNumber()- Returns:
- The line number associated with this location, or -1
-
getColumnNumber
public int getColumnNumber()- Returns:
- The column number associated with this location, or -1
-
toString
Converts thisLocation
into an english text, like 'File Main.java, Line 23, Column 79
'.
-