AnalysisCache
, ThreadSafeReportListener
public class NoopAnalysisCache extends java.lang.Object implements AnalysisCache
Constructor | Description |
---|---|
NoopAnalysisCache() |
Modifier and Type | Method | Description |
---|---|---|
void |
analysisFailed(java.io.File sourceFile) |
Notifies the cache that analysis of the given file has failed and should not be cached
|
void |
checkValidity(RuleSets ruleSets,
java.lang.ClassLoader classLoader) |
Checks if the cache is valid for the configured rulesets and class loader.
|
java.util.List<RuleViolation> |
getCachedViolations(java.io.File sourceFile) |
Retrieves cached violations for the given file.
|
boolean |
isUpToDate(java.io.File sourceFile) |
Check if a given file is up to date in the cache and can be skipped from analysis
|
void |
metricAdded(Metric metric) |
A new metric point has been reported.
|
void |
persist() |
Persist the analysis results on whatever means is used by the cache
|
void |
ruleViolationAdded(RuleViolation ruleViolation) |
A new violation has been found.
|
public void ruleViolationAdded(RuleViolation ruleViolation)
ThreadSafeReportListener
ruleViolationAdded
in interface ThreadSafeReportListener
ruleViolation
- the found violation.public void metricAdded(Metric metric)
ThreadSafeReportListener
metricAdded
in interface ThreadSafeReportListener
metric
- the metricpublic void persist()
AnalysisCache
persist
in interface AnalysisCache
public boolean isUpToDate(java.io.File sourceFile)
AnalysisCache
isUpToDate
in interface AnalysisCache
sourceFile
- The file to check in the cachepublic void analysisFailed(java.io.File sourceFile)
AnalysisCache
analysisFailed
in interface AnalysisCache
sourceFile
- The file whose analysis failedpublic void checkValidity(RuleSets ruleSets, java.lang.ClassLoader classLoader)
AnalysisCache
checkValidity
in interface AnalysisCache
ruleSets
- The rulesets configured for this analysis.classLoader
- The class loader for auxclasspath configured for this analysis.public java.util.List<RuleViolation> getCachedViolations(java.io.File sourceFile)
AnalysisCache
AnalysisCache.isUpToDate(File)
first.getCachedViolations
in interface AnalysisCache
sourceFile
- The file to check in the cacheCopyright © 2002–2018 PMD. All rights reserved.