Class AnalysisTask

  • All Implemented Interfaces:
    java.util.concurrent.Callable<java.lang.Void>

    @ThreadSafe
    public class AnalysisTask
    extends java.lang.Object
    implements java.util.concurrent.Callable<java.lang.Void>
    Task to support parallelism of dependency-check analysis. Analysis a single Dependency by a specific Analyzer.
    Author:
    Stefan Neuhaus
    • Constructor Summary

      Constructors 
      Constructor Description
      AnalysisTask​(Analyzer analyzer, Dependency dependency, Engine engine, java.util.List<java.lang.Throwable> exceptions)
      Creates a new analysis task.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Void call()
      Executes the analysis task.
      protected boolean shouldAnalyze()
      Determines if the analyzer can analyze the given dependency.
      • Methods inherited from class java.lang.Object

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

      • AnalysisTask

        public AnalysisTask​(Analyzer analyzer,
                            Dependency dependency,
                            Engine engine,
                            java.util.List<java.lang.Throwable> exceptions)
        Creates a new analysis task.
        Parameters:
        analyzer - a reference of the analyzer to execute
        dependency - the dependency to analyze
        engine - the dependency-check engine
        exceptions - exceptions that occur during analysis will be added to this collection of exceptions
    • Method Detail

      • call

        public java.lang.Void call()
        Executes the analysis task.
        Specified by:
        call in interface java.util.concurrent.Callable<java.lang.Void>
        Returns:
        null
      • shouldAnalyze

        protected boolean shouldAnalyze()
        Determines if the analyzer can analyze the given dependency.
        Returns:
        whether or not the analyzer can analyze the dependency