org.teatrove.tea.compiler
Class SourceInfo
java.lang.Object
org.teatrove.tea.compiler.SourceInfo
- All Implemented Interfaces:
- Serializable, Cloneable
- Direct Known Subclasses:
- SourceDetailedInfo
public class SourceInfo
- extends Object
- implements Cloneable, Serializable
Provides information on where an object (like a token) appeared in the
the source file.
- Author:
- Brian S O'Neill
- See Also:
- Serialized Form
|
Constructor Summary |
SourceInfo(int line,
int startPos,
int endPos)
|
SourceInfo
public SourceInfo(int line,
int startPos,
int endPos)
getLine
public int getLine()
- Returns:
- The line in the source file. The first line is one.
getStartPosition
public int getStartPosition()
- Returns:
- The character position in the source file where this object
started. The first position of the source file is zero.
getEndPosition
public int getEndPosition()
- Returns:
- The character position in the source file where this object
ended. The first position of the source file is zero.
getDetailPosition
public int getDetailPosition()
- Returns:
- A character position detailing this object. Usually is the same
as the start position.
setEndPosition
public SourceInfo setEndPosition(int endPos)
- Returns:
- A clone of this SourceInfo, but with a different end position
setEndPosition
public SourceInfo setEndPosition(SourceInfo info)
- Returns:
- A clone of this SourceInfo, but with a different end position
toString
public String toString()
- Overrides:
toString in class Object
Copyright © 1997-2012 TeaTrove.org. All Rights Reserved.