public class SourceInfo extends Object
| Constructor and Description |
|---|
SourceInfo(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.
|
| Modifier and Type | Method and Description |
|---|---|
SourceInfo |
add(int lineOffset,
int positionOffset)
Returns a source info with offsets added.
|
String |
getFileName()
Gets the filename.
|
int |
getLineNumber()
Gets the line number.
|
int |
getPosition()
Gets the character position within the line.
|
String |
getShortFileName()
Gets the filename without leading directories.
|
String |
toString() |
public SourceInfo(String fileName, int lineNumber, int position)
fileName - the namelineNumber - the linenumber (starting at 1, 0 if unknown)position - the character position withing the line (starting at 1, 0 if unknown)public SourceInfo(String fileName, int lineNumber)
fileName - the namelineNumber - the linenumber (starting at 1)public SourceInfo(String fileName)
fileName - the namepublic String getFileName()
public String getShortFileName()
public int getLineNumber()
public int getPosition()
public SourceInfo add(int lineOffset, int positionOffset)
lineOffset - number of lines to addpositionOffset - number of character positions to addCopyright © 2016 Krake Softwaretechnik. All rights reserved.