org.enhydra.xml.xmlc.misc
Class LineNumberRecorder

java.lang.Object
  |
  +--org.enhydra.xml.xmlc.misc.LineNumberMap
        |
        +--org.enhydra.xml.xmlc.misc.LineNumberRecorder

public final class LineNumberRecorder
extends LineNumberMap

Class that records information to translate a line number or byte offset in a stream into a source file and line number.


Inner classes inherited from class org.enhydra.xml.xmlc.misc.LineNumberMap
LineNumberMap.Line
 
Constructor Summary
LineNumberRecorder()
          Constructor with no initial file.
LineNumberRecorder(String fileName)
          Constructor, setting initial file.
 
Method Summary
 void countChar(char ch)
          Count a character read (and hope this gets inlined).
 void countChars(char[] chBuf, int off, int len)
          Count an array character's readed
 void popFile()
          Pop a file from the stack.
 void pushFile(String fileName)
          Push a file on the stack.
 
Methods inherited from class org.enhydra.xml.xmlc.misc.LineNumberMap
addLine, getLineFromLineNum, getLineFromOffset, toString
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LineNumberRecorder

public LineNumberRecorder(String fileName)
Constructor, setting initial file.

LineNumberRecorder

public LineNumberRecorder()
Constructor with no initial file.
Method Detail

pushFile

public void pushFile(String fileName)
Push a file on the stack. Called when an included file is opened.

popFile

public void popFile()
Pop a file from the stack. Called when an included file is closed. Allows for an extra pop to close the originally opened file.

countChar

public final void countChar(char ch)
Count a character read (and hope this gets inlined).

countChars

public final void countChars(char[] chBuf,
                             int off,
                             int len)
Count an array character's readed


Copyright © 1999-2002 enhydra.org (Mark Diekhans, David Li, Richard Kunze). All Rights reserved.