AnalysisCache, ThreadSafeReportListenerpublic 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)
ThreadSafeReportListenerruleViolationAdded in interface ThreadSafeReportListenerruleViolation - the found violation.public void metricAdded(Metric metric)
ThreadSafeReportListenermetricAdded in interface ThreadSafeReportListenermetric - the metricpublic void persist()
AnalysisCachepersist in interface AnalysisCachepublic boolean isUpToDate(java.io.File sourceFile)
AnalysisCacheisUpToDate in interface AnalysisCachesourceFile - The file to check in the cachepublic void analysisFailed(java.io.File sourceFile)
AnalysisCacheanalysisFailed in interface AnalysisCachesourceFile - The file whose analysis failedpublic void checkValidity(RuleSets ruleSets, java.lang.ClassLoader classLoader)
AnalysisCachecheckValidity in interface AnalysisCacheruleSets - 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)
AnalysisCacheAnalysisCache.isUpToDate(File) first.getCachedViolations in interface AnalysisCachesourceFile - The file to check in the cacheCopyright © 2002–2018 PMD. All rights reserved.