public abstract class AbstractReaderSource extends Object implements ReaderSource
Modifier and Type | Field and Description |
---|---|
protected CompilerConfiguration |
configuration |
Constructor and Description |
---|
AbstractReaderSource(CompilerConfiguration configuration) |
Modifier and Type | Method and Description |
---|---|
boolean |
canReopenSource()
Returns true if the source can be restarted (ie. if getReader()
will return non-null on subsequent calls.
|
void |
cleanup()
Cleans up any cached resources used by getLine().
|
String |
getLine(int lineNumber,
Janitor janitor)
Returns a line from the source, or null, if unavailable.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getReader
protected CompilerConfiguration configuration
public AbstractReaderSource(CompilerConfiguration configuration)
public boolean canReopenSource()
canReopenSource
in interface ReaderSource
public String getLine(int lineNumber, Janitor janitor)
getLine
in interface ReaderSource
lineNumber
- the number of the line of interestjanitor
- helper to clean up afterwardspublic void cleanup()
cleanup
in interface HasCleanup
cleanup
in interface ReaderSource