Class NoopAnalysisCache

    • Constructor Summary

      Constructors 
      Constructor Description
      NoopAnalysisCache()
      Deprecated.
       
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      void analysisFailed​(java.io.File sourceFile)
      Deprecated.
      Notifies the cache that analysis of the given file has failed and should not be cached.
      void checkValidity​(RuleSets ruleSets, java.lang.ClassLoader classLoader)
      Deprecated.
      Checks if the cache is valid for the configured rulesets and class loader.
      java.util.List<RuleViolation> getCachedViolations​(java.io.File sourceFile)
      Deprecated.
      Retrieves cached violations for the given file.
      boolean isUpToDate​(java.io.File sourceFile)
      Deprecated.
      Checks if a given file is up to date in the cache and can be skipped from analysis.
      void metricAdded​(Metric metric)
      Deprecated.
      A new metric point has been reported.
      void persist()
      Deprecated.
      Persists the updated analysis results on whatever medium is used by the cache.
      void ruleViolationAdded​(RuleViolation ruleViolation)
      Deprecated.
      A new violation has been found.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • NoopAnalysisCache

        public NoopAnalysisCache()
        Deprecated.
    • Method Detail

      • persist

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

        public boolean isUpToDate​(java.io.File sourceFile)
        Deprecated.
        Description copied from interface: AnalysisCache
        Checks if a given file is up to date in the cache and can be skipped from analysis. Regardless of the return value of this method, each call adds the parameter to the updated cache, which allows ThreadSafeReportListener.ruleViolationAdded(RuleViolation) to add a rule violation to the file. TODO is this really best behaviour? This side-effects seems counter-intuitive.
        Specified by:
        isUpToDate in interface AnalysisCache
        Parameters:
        sourceFile - The file to check in the cache
        Returns:
        True if the cache is a hit, false otherwise
      • analysisFailed

        public void analysisFailed​(java.io.File sourceFile)
        Deprecated.
        Description copied from interface: AnalysisCache
        Notifies the cache that analysis of the given file has failed and should not be cached.
        Specified by:
        analysisFailed in interface AnalysisCache
        Parameters:
        sourceFile - The file whose analysis failed
      • checkValidity

        public void checkValidity​(RuleSets ruleSets,
                                  java.lang.ClassLoader classLoader)
        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 of AnalysisCache.isUpToDate(File).
        Specified by:
        checkValidity in interface AnalysisCache
        Parameters:
        ruleSets - The rulesets configured for this analysis.
        classLoader - The class loader for auxclasspath configured for this analysis.