class SourceFileIndexer extends java.lang.Object
Utility class used to transform path relative to the source directory to their path relative to the root directory.
Modifiers | Name | Description |
---|---|---|
private java.util.List<java.lang.String> |
allSourceFiles |
List of source files found in the current Maven project. |
Constructor and description |
---|
SourceFileIndexer() |
Type Params | Return Type | Name and description |
---|---|---|
|
protected void |
buildListSourceFiles(MavenSession session) Initialize the complete list of source files with their |
|
private java.lang.String |
normalizePath(java.lang.String path) Normalize path to use forward slash. |
|
private void |
scanDirectory(java.io.File directory, java.util.List<java.lang.String> files, java.lang.String baseDirectory) Recursively scan the directory given and add all files found to the files array list. |
|
protected java.lang.String |
searchActualFilesLocation(java.lang.String filename) Transform partial path to complete path |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll(), java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#wait() |
List of source files found in the current Maven project.
Initialize the complete list of source files with their
project
- Reference to the Maven project to get the list of source directoriessession
- Reference to the Maven session used to get the location of the root directoryNormalize path to use forward slash.
This will facilitate searches.
path
- Path to clean upRecursively scan the directory given and add all files found to the files array list. The base directory will be truncated from the path stored.
directory
- Directory to scanfiles
- ArrayList where files found will be storedbaseDirectory
- This part will be truncated from path storedTransform partial path to complete path
filename
- Partial name to searchspotbugs-maven-plugin Groovy Documentation