orc.error
Class SourceLocation
java.lang.Object
orc.error.SourceLocation
- All Implemented Interfaces:
- java.io.Serializable
public class SourceLocation
- extends java.lang.Object
- implements java.io.Serializable
A source location, with file, offset, line, and column information.
- Author:
- quark, dkitchin
- See Also:
- Serialized Form
Constructor Summary |
SourceLocation()
No-arg constructor so that this can be serialized to XML by JAXB |
SourceLocation(java.io.File filename,
java.lang.Integer offset,
java.lang.Integer line,
java.lang.Integer column,
java.lang.Integer endOffset,
java.lang.Integer endLine,
java.lang.Integer endColumn)
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
offset
public java.lang.Integer offset
line
public java.lang.Integer line
column
public java.lang.Integer column
endOffset
public java.lang.Integer endOffset
endLine
public java.lang.Integer endLine
endColumn
public java.lang.Integer endColumn
file
public java.io.File file
UNKNOWN
public static final SourceLocation UNKNOWN
SourceLocation
public SourceLocation()
- No-arg constructor so that this can be serialized to XML by JAXB
SourceLocation
public SourceLocation(java.io.File filename,
java.lang.Integer offset,
java.lang.Integer line,
java.lang.Integer column,
java.lang.Integer endOffset,
java.lang.Integer endLine,
java.lang.Integer endColumn)
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in class java.lang.Object
isUnknown
public boolean isUnknown()
overlap
public SourceLocation overlap(SourceLocation that)
- Create a new source location that overlaps both this location
and the argument location. Both locations must be in the same file;
returns UNKNOWN if the filenames are not equal.
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
getCaret
public java.lang.String getCaret()