Class AbstractSourceLoader

java.lang.Object
org.eluder.coveralls.maven.plugin.source.AbstractSourceLoader
All Implemented Interfaces:
SourceLoader
Direct Known Subclasses:
DirectorySourceLoader, ScanSourceLoader, UrlSourceLoader

public abstract class AbstractSourceLoader extends Object implements SourceLoader
The Class AbstractSourceLoader.
  • Constructor Details

    • AbstractSourceLoader

      protected AbstractSourceLoader(URI base, URI sourceBase, Charset sourceEncoding)
      Instantiates a new abstract source loader.
      Parameters:
      base - the base
      sourceBase - the source base
      sourceEncoding - the source encoding
  • Method Details

    • load

      public Source load(String sourceFile) throws IOException
      Description copied from interface: SourceLoader
      Load.
      Specified by:
      load in interface SourceLoader
      Parameters:
      sourceFile - the source file
      Returns:
      the source
      Throws:
      IOException - Signals that an I/O exception has occurred.
    • getSourceEncoding

      protected Charset getSourceEncoding()
      Gets the source encoding.
      Returns:
      the source encoding
    • getFileName

      protected String getFileName(String sourceFile)
      Gets the file name.
      Parameters:
      sourceFile - the source file
      Returns:
      the file name
    • locate

      protected abstract InputStream locate(String sourceFile) throws IOException
      Locate.
      Parameters:
      sourceFile - the source file
      Returns:
      the input stream
      Throws:
      IOException - Signals that an I/O exception has occurred.