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. |
private java.util.concurrent.locks.ReentrantLock |
lock |
Reentrant lock to ensure class is thread safe. |
| 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 static java.lang.String |
normalizePath(java.lang.String path)Normalize path to use forward slash. |
|
private void |
scanDirectory(java.nio.file.Path directory, 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#getClass(), java.lang.Object#hashCode(), java.lang.Object#notify(), java.lang.Object#notifyAll(), java.lang.Object#toString(), java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int) |
List of source files found in the current Maven project.
Reentrant lock to ensure class is thread safe.
Initialize the complete list of source files with their
session - 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 scanbaseDirectory - This part will be truncated from path storedTransform partial path to complete path
filename - Partial name to searchspotbugs-maven-plugin Groovy Documentation