public class NoopAnalysisCache extends Object implements AnalysisCache
Constructor and Description |
---|
NoopAnalysisCache() |
Modifier and Type | Method and Description |
---|---|
void |
analysisFailed(File sourceFile)
Notifies the cache that analysis of the given file has failed and should not be cached
|
void |
checkValidity(RuleSets ruleSets,
ClassLoader classLoader)
Checks if the cache is valid for the configured rulesets and class loader.
|
List<RuleViolation> |
getCachedViolations(File sourceFile)
Retrieves cached violations for the given file.
|
boolean |
isUpToDate(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 ReportListener
ruleViolationAdded
in interface ThreadSafeReportListener
ruleViolation
- the found violation.public void metricAdded(Metric metric)
ThreadSafeReportListener
metricAdded
in interface ReportListener
metricAdded
in interface ThreadSafeReportListener
metric
- the metricpublic void persist()
AnalysisCache
persist
in interface AnalysisCache
public boolean isUpToDate(File sourceFile)
AnalysisCache
isUpToDate
in interface AnalysisCache
sourceFile
- The file to check in the cachepublic void analysisFailed(File sourceFile)
AnalysisCache
analysisFailed
in interface AnalysisCache
sourceFile
- The file whose analysis failedpublic void checkValidity(RuleSets ruleSets, ClassLoader classLoader)
AnalysisCache
checkValidity
in interface AnalysisCache
ruleSets
- The rulesets configured for this analysis.classLoader
- The class loader configured for this analysis.public List<RuleViolation> getCachedViolations(File sourceFile)
AnalysisCache
AnalysisCache.isUpToDate(File)
first.getCachedViolations
in interface AnalysisCache
sourceFile
- The file to check in the cacheCopyright © 2002–2017 PMD. All rights reserved.