public interface Analyzer
An interface that defines an Analyzer that is used to identify Dependencies. An analyzer will collect information about the dependency in the form of Evidence.
When the Engine
executes it will load the
analyzers and call the methods in the following order:
Modifier and Type | Method and 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.
|
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.
|
void analyze(Dependency dependency, Engine engine) throws AnalysisException
dependency
- a dependency to analyze.engine
- the engine that is scanning the dependencies - this is
useful if we need to check other dependenciesAnalysisException
- is thrown if there is an error analyzing the
dependency fileString getName()
AnalysisPhase getAnalysisPhase()
void initialize(Settings settings)
settings
- the configured settingsvoid prepare(Engine engine) throws InitializationException
engine
- a reference to the dependency-check engineInitializationException
- is thrown if an exception occurs
initializing the analyzer.void close() throws Exception
Exception
- is thrown if an exception occurs closing the analyzer.boolean supportsParallelProcessing()
true
if the analyzer supports parallel processing,
false
elseboolean isEnabled()
Copyright © 2012–2018 OWASP. All rights reserved.