Package org.jacoco.ant
Class AntFilesLocator
- java.lang.Object
-
- org.jacoco.report.InputStreamSourceFileLocator
-
- org.jacoco.ant.AntFilesLocator
-
- All Implemented Interfaces:
ISourceFileLocator
class AntFilesLocator extends InputStreamSourceFileLocator
Source locator based on Ant file resources.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<java.lang.String,org.apache.tools.ant.types.Resource>resources
-
Constructor Summary
Constructors Constructor Description AntFilesLocator(java.lang.String encoding, int tabWidth)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) voidadd(org.apache.tools.ant.types.Resource file)Adds the given file resource as a potential source file.protected java.io.InputStreamgetSourceStream(java.lang.String path)Tries to locate the given source file and opens its binary content.-
Methods inherited from class org.jacoco.report.InputStreamSourceFileLocator
getSourceFile, getTabWidth
-
-
-
-
Method Detail
-
add
void add(org.apache.tools.ant.types.Resource file)
Adds the given file resource as a potential source file.- Parameters:
file- file resource to add
-
getSourceStream
protected java.io.InputStream getSourceStream(java.lang.String path) throws java.io.IOExceptionDescription copied from class:InputStreamSourceFileLocatorTries to locate the given source file and opens its binary content.- Specified by:
getSourceStreamin classInputStreamSourceFileLocator- Parameters:
path- local path to the resource- Returns:
- stream if the file could be located,
nullotherwise - Throws:
java.io.IOException- in case of problems while opening the stream
-
-