Class ByLineReaderSource
java.lang.Object
org.apache.maven.doxia.util.ByLineReaderSource
- All Implemented Interfaces:
ByLineSource
ByLineSource default implementation-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Stringholds the last line returned by getNextLine()private intcurrent line numberprivate Stringprivate LineNumberReaderreaderprivate booleantrueif ungetLine() was called and no getNextLine() was called -
Constructor Summary
ConstructorsConstructorDescriptionCreates the ByLineReaderSource.ByLineReaderSource(Reader in, String name) Constructor for ByLineReaderSource. -
Method Summary
-
Field Details
-
reader
reader -
lineNumber
private int lineNumbercurrent line number -
lastLine
holds the last line returned by getNextLine() -
ungetted
private boolean ungettedtrueif ungetLine() was called and no getNextLine() was called -
name
-
-
Constructor Details
-
ByLineReaderSource
Creates the ByLineReaderSource.- Parameters:
in- real source :)
-
ByLineReaderSource
-
-
Method Details
-
getNextLine
getNextLine.
- Specified by:
getNextLinein interfaceByLineSource- Returns:
- a
Stringobject. - Throws:
ParseException- if any.
-
getName
getName.
- Specified by:
getNamein interfaceByLineSource- Returns:
- a
Stringobject.
-
getLineNumber
public final int getLineNumber()getLineNumber.
- Specified by:
getLineNumberin interfaceByLineSource- Returns:
- a int.
-
close
-
ungetLine
public final void ungetLine()ungetLine.
This should throw a java.lang.IllegalStateException if called more than one time without calling getNextLine().- Specified by:
ungetLinein interfaceByLineSource
-
unget
unget.
- Specified by:
ungetin interfaceByLineSource- Parameters:
s- some text to push back to the parser. This should throw a java.lang.IllegalStateException if called more than one time without calling getNextLine().
-