|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.enhydra.xml.xmlc.misc.LineNumberMap
Table that keeps a map of character offsets and line count in an input stream to file name and line numbers in source files. This is used to handle mapping of indexes or line numbers in a stream generted by including files to those in the original files.
Nested Class Summary | |
class |
LineNumberMap.Line
Structure to record the char offset in an input stream for a line. |
Constructor Summary | |
LineNumberMap()
|
Method Summary | |
void |
addLine(String fileName,
int lineNum,
int streamLineNum,
int streamCharOffset)
Add a line to the map. |
LineNumberMap.Line |
getLineFromLineNum(int streamLineNum)
Get the filname end line number for a stream character offset. |
LineNumberMap.Line |
getLineFromOffset(int streamCharOffset)
Get the filname end line number for a stream line number. |
String |
toString()
Get String reprsentation for debugging |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public LineNumberMap()
Method Detail |
public final void addLine(String fileName, int lineNum, int streamLineNum, int streamCharOffset)
public final LineNumberMap.Line getLineFromOffset(int streamCharOffset)
public final LineNumberMap.Line getLineFromLineNum(int streamLineNum)
public String toString()
toString
in class Object
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |