Package net.sourceforge.pmd.cache
Class FileAnalysisCache
- java.lang.Object
-
- net.sourceforge.pmd.cache.AbstractAnalysisCache
-
- net.sourceforge.pmd.cache.FileAnalysisCache
-
- All Implemented Interfaces:
AnalysisCache
,ThreadSafeReportListener
@Deprecated @InternalApi public class FileAnalysisCache extends AbstractAnalysisCache
Deprecated.This is internal API, will be hidden with 7.0.0An analysis cache backed by a regular file.
-
-
Field Summary
-
Fields inherited from class net.sourceforge.pmd.cache.AbstractAnalysisCache
auxClassPathChecksum, executionClassPathChecksum, fileResultsCache, FINGERPRINTER, LOG, pmdVersion, ruleMapper, rulesetChecksum, updatedResultsCache
-
-
Constructor Summary
Constructors Constructor Description FileAnalysisCache(File cache)
Deprecated.Creates a new cache backed by the given file.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected boolean
cacheExists()
Deprecated.Returns true if the cache exists.void
checkValidity(RuleSets ruleSets, ClassLoader auxclassPathClassLoader)
Deprecated.Checks if the cache is valid for the configured rulesets and class loader.void
persist()
Deprecated.Persists the updated analysis results on whatever medium is used by the cache.-
Methods inherited from class net.sourceforge.pmd.cache.AbstractAnalysisCache
analysisFailed, getCachedViolations, isUpToDate, metricAdded, ruleViolationAdded
-
-
-
-
Constructor Detail
-
FileAnalysisCache
public FileAnalysisCache(File cache)
Deprecated.Creates a new cache backed by the given file.- Parameters:
cache
- The file on which to store analysis cache
-
-
Method Detail
-
checkValidity
public void checkValidity(RuleSets ruleSets, ClassLoader auxclassPathClassLoader)
Deprecated.Description copied from interface:AnalysisCache
Checks if the cache is valid for the configured rulesets and class loader. If the provided rulesets and classpath don't match those of the cache, the cache is invalidated. This needs to be called before analysis, as it conditions the good behaviour ofAnalysisCache.isUpToDate(File)
.- Specified by:
checkValidity
in interfaceAnalysisCache
- Overrides:
checkValidity
in classAbstractAnalysisCache
- Parameters:
ruleSets
- The rulesets configured for this analysis.auxclassPathClassLoader
- The class loader for auxclasspath configured for this analysis.
-
persist
public void persist()
Deprecated.Description copied from interface:AnalysisCache
Persists the updated analysis results on whatever medium is used by the cache.
-
cacheExists
protected boolean cacheExists()
Deprecated.Description copied from class:AbstractAnalysisCache
Returns true if the cache exists. If so, normal cache validity checks will be performed. Otherwise, the cache is necessarily invalid (e.g. on a first run).- Specified by:
cacheExists
in classAbstractAnalysisCache
-
-