Package net.sourceforge.pmd.cache
Class FileAnalysisCache
- java.lang.Object
-
- net.sourceforge.pmd.cache.AbstractAnalysisCache
-
- net.sourceforge.pmd.cache.FileAnalysisCache
-
- All Implemented Interfaces:
AnalysisCache
@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 booleancacheExists()Deprecated.Returns true if the cache exists.voidcheckValidity(RuleSets ruleSets, ClassLoader auxclassPathClassLoader)Deprecated.Checks if the cache is valid for the configured rulesets and class loader.voidpersist()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, startFileAnalysis
-
-
-
-
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:AnalysisCacheChecks 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(TextDocument).- Specified by:
checkValidityin interfaceAnalysisCache- Overrides:
checkValidityin 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:AnalysisCachePersists the updated analysis results on whatever medium is used by the cache.
-
cacheExists
protected boolean cacheExists()
Deprecated.Description copied from class:AbstractAnalysisCacheReturns 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:
cacheExistsin classAbstractAnalysisCache
-
-