Interface Analyzer

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void analyze​(Dependency dependency, Engine engine)
      Analyzes the given dependency.
      void close()
      The close method is called after all of the dependencies have been analyzed.
      AnalysisPhase getAnalysisPhase()
      Returns the phase that the analyzer is intended to run in.
      java.lang.String getName()
      Returns the name of the analyzer.
      void initialize​(Settings settings)
      Initializes the analyzer with the configured settings.
      boolean isEnabled()
      Get the value of enabled.
      void prepare​(Engine engine)
      The prepare method is called (once) prior to the analyze method being called on all of the dependencies.
      boolean supportsParallelProcessing()
      Returns whether multiple instances of the same type of analyzer can run in parallel.
    • Method Detail

      • analyze

        void analyze​(Dependency dependency,
                     Engine engine)
              throws AnalysisException
        Analyzes the given dependency. The analysis could be anything from identifying an Identifier for the dependency, to finding vulnerabilities, etc. Additionally, if the analyzer collects enough information to add a description or license information for the dependency it should be added.
        Parameters:
        dependency - a dependency to analyze.
        engine - the engine that is scanning the dependencies - this is useful if we need to check other dependencies
        Throws:
        AnalysisException - is thrown if there is an error analyzing the dependency file
      • getName

        java.lang.String getName()
        Returns the name of the analyzer.
        Returns:
        the name of the analyzer.
      • getAnalysisPhase

        AnalysisPhase getAnalysisPhase()
        Returns the phase that the analyzer is intended to run in.
        Returns:
        the phase that the analyzer is intended to run in.
      • initialize

        void initialize​(Settings settings)
        Initializes the analyzer with the configured settings.
        Parameters:
        settings - the configured settings
      • prepare

        void prepare​(Engine engine)
              throws InitializationException
        The prepare method is called (once) prior to the analyze method being called on all of the dependencies.
        Parameters:
        engine - a reference to the dependency-check engine
        Throws:
        InitializationException - is thrown if an exception occurs initializing the analyzer.
      • close

        void close()
            throws java.lang.Exception
        The close method is called after all of the dependencies have been analyzed.
        Throws:
        java.lang.Exception - is thrown if an exception occurs closing the analyzer.
      • supportsParallelProcessing

        boolean supportsParallelProcessing()
        Returns whether multiple instances of the same type of analyzer can run in parallel. Note that running analyzers of different types in parallel is not supported at all.
        Returns:
        true if the analyzer supports parallel processing, false else
      • isEnabled

        boolean isEnabled()
        Get the value of enabled.
        Returns:
        the value of enabled