public class FileLocations extends FilteredLog
| Modifier and Type | Class and Description |
|---|---|
static class |
FileLocations.FileSystem
File system facade for test cases.
|
| Constructor and Description |
|---|
FileLocations(File workspace)
Creates a new instance of
FileLocations. |
FileLocations(String workspace)
Creates a new instance of
FileLocations. |
FileLocations(String workspace,
FileLocations.FileSystem fileSystem)
Creates a new instance of
FileLocations. |
| Modifier and Type | Method and Description |
|---|---|
void |
addLine(String fileName,
int lineStart)
Adds the specified affected file and line number.
|
boolean |
contains(String fileName)
Returns whether the specified file has been added.
|
Set<String> |
getAbsolutePaths()
Returns the absolute file names of all files.
|
Set<Integer> |
getLines(String fileName)
Returns the added lines for the specified file.
|
Set<String> |
getRelativePaths()
Returns the relative file names of all files.
|
Set<String> |
getSkippedFiles() |
String |
getWorkspace() |
boolean |
isEmpty()
Returns whether some files have been added.
|
int |
size()
Returns the number of files that have been added.
|
getErrorMessages, getInfoMessages, logError, logException, logInfo, logSummarypublic FileLocations(String workspace)
FileLocations.workspace - the workspace to get the Git repository frompublic FileLocations(File workspace)
FileLocations.workspace - the workspace to get the Git repository frompublic FileLocations(String workspace, FileLocations.FileSystem fileSystem)
FileLocations.workspace - the workspace to get the Git repository fromfileSystem - file system stubpublic String getWorkspace()
public void addLine(String fileName, int lineStart)
workspace will be processed.fileName - the absolute file name that will be used as a keylineStart - the line number to find the blame forpublic boolean isEmpty()
true if there a no blames available, false otherwisepublic int size()
size in class FilteredLogpublic boolean contains(String fileName)
fileName - the relative or absolute path of the filetrue if the file already has been added, false otherwisepublic Set<String> getRelativePaths()
public Set<String> getAbsolutePaths()
public Set<Integer> getLines(String fileName)
fileName - the relative or absolute path of the fileNoSuchElementException - if the file name is not registeredCopyright © 2016–2019. All rights reserved.