Package: org.codehaus.groovy.control.io

## [Java] Class AbstractReaderSource

- org.codehaus.groovy.control.io.AbstractReaderSource

- All Implemented Interfaces and Traits:
    ReaderSource

      public abstract class AbstractReaderSource
      extends Object
      implements ReaderSource

  For ReaderSources that can choose a parent class, a base that provides common functionality.

- - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `protected CompilerConfiguration` | `configuration` | Compiler configuration used to decode the source.

  - ### Constructor Summary

    Constructors
    Constructor and description
    `AbstractReaderSource(CompilerConfiguration configuration)` Creates a reader source backed by the supplied compiler configuration.

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public boolean` | `canReopenSource()` Returns true if the source can be restarted (i.e. 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.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Object` | `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### protected CompilerConfiguration configuration

      Compiler configuration used to decode the source.

  - ### Constructor Detail

    - #### public AbstractReaderSource(CompilerConfiguration configuration)

      Creates a reader source backed by the supplied compiler configuration.

      Parameters:
        `configuration` - the compiler configuration to use

  - ### Method Detail

    - #### public boolean canReopenSource()

      Returns true if the source can be restarted (i.e. 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.