Extension of JavaFileMetricsCollector that logs progress and errors through Gradle
logging.
| Constructor and description |
|---|
LoggingFileMetricsCollector
(java.nio.charset.Charset pFileEncoding)Create a new LoggingFileMetricsCollector. |
| Type | Name and description |
|---|---|
java.lang.Iterable<org.myire.scent.metrics.PackageMetrics> |
getCollectedMetrics()Get the metrics collected by this instance. |
java.nio.file.FileVisitResult |
postVisitDirectory(java.nio.file.Path pDirectory, java.io.IOException pException)Log any exception thrown when iterating over the items in a directory. |
java.nio.file.FileVisitResult |
preVisitDirectory(java.nio.file.Path pDirectory, java.nio.file.attribute.BasicFileAttributes pAttributes)Log that a directory is about to be scanned for Java files to collect metrics from. |
java.nio.file.FileVisitResult |
visitFile(java.nio.file.Path pFile, java.nio.file.attribute.BasicFileAttributes pAttributes)Visit a file by collecting source code metrics from it if it is a Java file. |
java.nio.file.FileVisitResult |
visitFileFailed(java.nio.file.Path pFile, java.io.IOException pException)Log an exception thrown when opening a file or when reading its attributes. |
| Methods inherited from class | Name |
|---|---|
class org.myire.scent.file.JavaFileMetricsCollector |
org.myire.scent.file.JavaFileMetricsCollector#getNumFiles(), org.myire.scent.file.JavaFileMetricsCollector#visitFile(java.nio.file.Path, java.nio.file.attribute.BasicFileAttributes), org.myire.scent.file.JavaFileMetricsCollector#visitFile(java.lang.Object, java.nio.file.attribute.BasicFileAttributes), org.myire.scent.file.JavaFileMetricsCollector#preVisitDirectory(java.lang.Object, java.nio.file.attribute.BasicFileAttributes), org.myire.scent.file.JavaFileMetricsCollector#visitFileFailed(java.lang.Object, java.io.IOException), org.myire.scent.file.JavaFileMetricsCollector#postVisitDirectory(java.lang.Object, java.io.IOException), org.myire.scent.file.JavaFileMetricsCollector#wait(long, int), org.myire.scent.file.JavaFileMetricsCollector#wait(long), org.myire.scent.file.JavaFileMetricsCollector#wait(), org.myire.scent.file.JavaFileMetricsCollector#equals(java.lang.Object), org.myire.scent.file.JavaFileMetricsCollector#toString(), org.myire.scent.file.JavaFileMetricsCollector#hashCode(), org.myire.scent.file.JavaFileMetricsCollector#getClass(), org.myire.scent.file.JavaFileMetricsCollector#notify(), org.myire.scent.file.JavaFileMetricsCollector#notifyAll() |
class java.nio.file.SimpleFileVisitor |
java.nio.file.SimpleFileVisitor#visitFile(java.lang.Object, java.nio.file.attribute.BasicFileAttributes), java.nio.file.SimpleFileVisitor#preVisitDirectory(java.lang.Object, java.nio.file.attribute.BasicFileAttributes), java.nio.file.SimpleFileVisitor#visitFileFailed(java.lang.Object, java.io.IOException), java.nio.file.SimpleFileVisitor#postVisitDirectory(java.lang.Object, java.io.IOException), java.nio.file.SimpleFileVisitor#wait(long, int), java.nio.file.SimpleFileVisitor#wait(long), java.nio.file.SimpleFileVisitor#wait(), java.nio.file.SimpleFileVisitor#equals(java.lang.Object), java.nio.file.SimpleFileVisitor#toString(), java.nio.file.SimpleFileVisitor#hashCode(), java.nio.file.SimpleFileVisitor#getClass(), java.nio.file.SimpleFileVisitor#notify(), java.nio.file.SimpleFileVisitor#notifyAll() |
Create a new LoggingFileMetricsCollector.
pFileEncoding - The charset the Java files are encoded with.Get the metrics collected by this instance.
Log any exception thrown when iterating over the items in a directory.
pFile - The path to the file.pException - The exception, or null if the directory was visited successfully.FileVisitResult.CONTINUE.Log that a directory is about to be scanned for Java files to collect metrics from.
pDirectory - The path to the directory.pAttributes - The directory's attributes.FileVisitResult.CONTINUE.Visit a file by collecting source code metrics from it if it is a Java file. If an error occurs when accessing the file it will be logged, and the file processing will be continued.
pFile - The path to the file.pAttributes - The file's attributes.FileVisitResult.CONTINUE.Log an exception thrown when opening a file or when reading its attributes.
pFile - The path to the file.pException - The exception.FileVisitResult.CONTINUE.