Class FileAnalysisCache

    • Constructor Detail

      • FileAnalysisCache

        public FileAnalysisCache​(File cache)
        Creates a new cache backed by the given file.
        cache - The file on which to store analysis cache
    • Method Detail

      • checkValidity

        public void checkValidity​(RuleSets ruleSets,
                                  ClassLoader auxclassPathClassLoader,
                                  Collection<? extends TextFile> files)
        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 of AnalysisCache.isUpToDate(TextDocument).
        Specified by:
        checkValidity in interface AnalysisCache
        checkValidity in class AbstractAnalysisCache
        ruleSets - The rulesets configured for this analysis.
        auxclassPathClassLoader - The class loader for auxclasspath configured for this analysis.
        files - Set of files in the current analysis. File records in the cache are matched to the file IDs of these files.
      • persist

        public void persist()
        Description copied from interface: AnalysisCache
        Persists the updated analysis results on whatever medium is used by the cache.
      • cacheExists

        protected boolean cacheExists()
        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 class AbstractAnalysisCache