orc.error
Class SourceLocation

java.lang.Object
  extended by 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, line, and column information.

Author:
quark, dkitchin
See Also:
Serialized Form

Field Summary
 java.lang.Integer column
           
 java.lang.Integer endColumn
           
 java.lang.Integer endLine
           
 java.io.File file
           
 java.lang.Integer line
           
static SourceLocation UNKNOWN
           
 
Constructor Summary
SourceLocation()
          No-arg constructor so that this can be serialized to XML by JAXB
SourceLocation(java.io.File filename, java.lang.Integer line, java.lang.Integer column, java.lang.Integer endLine, java.lang.Integer endColumn)
           
 
Method Summary
 boolean isUnknown()
           
 SourceLocation overlap(SourceLocation that)
          Create a new source location that overlaps both this location and the argument location.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

line

public java.lang.Integer line

column

public java.lang.Integer column

endLine

public java.lang.Integer endLine

endColumn

public java.lang.Integer endColumn

file

public java.io.File file

UNKNOWN

public static final SourceLocation UNKNOWN
Constructor Detail

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 line,
                      java.lang.Integer column,
                      java.lang.Integer endLine,
                      java.lang.Integer endColumn)
Method Detail

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