[Java] Class AbstractReaderSource
- org.codehaus.groovy.control.io.AbstractReaderSource
- All Implemented Interfaces and Traits:
- ReaderSource
public abstract class AbstractReaderSource extends Object
For ReaderSources that can choose a parent class, a base that provides common functionality.
- Authors:
- Chris Poirier
Field Summary
Modifiers | Name | Description |
---|---|---|
protected CompilerConfiguration | configuration |
Constructor Summary
Constructor and description |
---|
AbstractReaderSource
(CompilerConfiguration configuration) |
Methods Summary
Type Params | Return Type | Name 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. |
Inherited Methods Summary
Methods inherited from class | Name |
---|---|
class Object | wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll |
Field Detail
protected CompilerConfiguration configuration
Constructor Detail
public AbstractReaderSource(CompilerConfiguration configuration)
Method Detail
public boolean canReopenSource()
Returns true if the source can be restarted (ie. if getReader() will return non-null on subsequent calls.
public void cleanup()
Cleans up any cached resources used by getLine().
public String getLine(int lineNumber, Janitor janitor)
Returns a line from the source, or null, if unavailable. If you supply a Janitor, resources will be cached.
© 2003-2020 The Apache Software Foundation
Licensed under the Apache license.
https://docs.groovy-lang.org/2.4.21/html/gapi/org/codehaus/groovy/control/io/AbstractReaderSource.html