java.lang.Object
org.tentackle.model.SourceInfo
Information about the source.
- Author:
- harald
-
Constructor Summary
ConstructorsConstructorDescriptionSourceInfo(String fileName) Creates a source info.SourceInfo(String fileName, int lineNumber) Creates a source info.SourceInfo(String fileName, int lineNumber, int position) Creates a source info. -
Method Summary
-
Constructor Details
-
SourceInfo
Creates a source info.- Parameters:
fileName- the namelineNumber- the linenumber (starting at 1, 0 if unknown)position- the character position withing the line (starting at 1, 0 if unknown)
-
SourceInfo
Creates a source info.- Parameters:
fileName- the namelineNumber- the linenumber (starting at 1)
-
SourceInfo
Creates a source info.- Parameters:
fileName- the name
-
-
Method Details
-
getFileName
Gets the filename.- Returns:
- the filename
-
getShortFileName
Gets the filename without leading directories.- Returns:
- the short filename
-
getLineNumber
public int getLineNumber()Gets the line number.- Returns:
- the line number starting at 1
-
getPosition
public int getPosition()Gets the character position within the line.- Returns:
- the position, starting at 1
-
add
Returns a source info with offsets added.- Parameters:
lineOffset- number of lines to addpositionOffset- number of character positions to add- Returns:
- the new info
-
toString
-
hashCode
public int hashCode() -
equals
-