public class DependencyMergingAnalyzer extends AbstractDependencyComparingAnalyzer
This analyzer will merge dependencies, created from different source, into a single dependency.
| Constructor and Description |
|---|
DependencyMergingAnalyzer() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
evaluateDependencies(Dependency dependency,
Dependency nextDependency,
Set<Dependency> dependenciesToRemove)
Evaluates the dependencies
|
AnalysisPhase |
getAnalysisPhase()
Returns the phase that the analyzer is intended to run in.
|
protected String |
getAnalyzerEnabledSettingKey()
Returns the setting key to determine if the analyzer is enabled.
|
protected Dependency |
getMainAndroidDependency(Dependency dependency1,
Dependency dependency2)
Determines which of the android dependencies should be considered the
primary.
|
protected Dependency |
getMainDotnetDependency(Dependency dependency1,
Dependency dependency2)
Determines which of the dotnet dependencies should be considered the
primary.
|
protected Dependency |
getMainGemspecDependency(Dependency dependency1,
Dependency dependency2)
Ruby gems installed by "bundle install" can have zero or more *.gemspec
files, all of which have the same packagePath and should be grouped.
|
protected Dependency |
getMainSwiftDependency(Dependency dependency1,
Dependency dependency2)
Determines which of the swift dependencies should be considered the
primary.
|
String |
getName()
Returns the name of the analyzer.
|
protected boolean |
isSameRubyGem(Dependency dependency1,
Dependency dependency2)
Bundling Ruby gems that are identified from different .gemspec files but
denote the same package path.
|
protected boolean |
isSameSwiftPackage(Dependency dependency1,
Dependency dependency2)
Bundling same swift dependencies with the same packagePath but identified
by different file type analyzers.
|
static void |
mergeDependencies(Dependency dependency,
Dependency relatedDependency,
Set<Dependency> dependenciesToRemove)
Adds the relatedDependency to the dependency's related dependencies.
|
analyzeDependency, getAnalyzed, supportsParallelProcessinganalyze, close, closeAnalyzer, getSettings, initialize, isEnabled, prepare, prepareAnalyzer, setEnabledpublic String getName()
public AnalysisPhase getAnalysisPhase()
protected String getAnalyzerEnabledSettingKey()
Returns the setting key to determine if the analyzer is enabled.
getAnalyzerEnabledSettingKey in class AbstractAnalyzerprotected boolean evaluateDependencies(Dependency dependency, Dependency nextDependency, Set<Dependency> dependenciesToRemove)
evaluateDependencies in class AbstractDependencyComparingAnalyzerdependency - a dependency to comparenextDependency - a dependency to comparedependenciesToRemove - a set of dependencies that will be removedpublic static void mergeDependencies(Dependency dependency, Dependency relatedDependency, Set<Dependency> dependenciesToRemove)
dependency - the main dependencyrelatedDependency - a collection of dependencies to be removed from
the main analysis loop, this is the source of dependencies to removedependenciesToRemove - a collection of dependencies that will be
removed from the main analysis loop, this function adds to this
collectionprotected boolean isSameRubyGem(Dependency dependency1, Dependency dependency2)
dependency1 - dependency to comparedependency2 - dependency to compareprotected Dependency getMainGemspecDependency(Dependency dependency1, Dependency dependency2)
dependency1 - dependency to comparedependency2 - dependency to compareprotected boolean isSameSwiftPackage(Dependency dependency1, Dependency dependency2)
dependency1 - dependency to testdependency2 - dependency to testtrue if the dependencies appear to be the same;
otherwise falseprotected Dependency getMainSwiftDependency(Dependency dependency1, Dependency dependency2)
dependency1 - the first swift dependency to comparedependency2 - the second swift dependency to compareprotected Dependency getMainAndroidDependency(Dependency dependency1, Dependency dependency2)
dependency1 - the first android dependency to comparedependency2 - the second android dependency to compareprotected Dependency getMainDotnetDependency(Dependency dependency1, Dependency dependency2)
dependency1 - the first dotnet dependency to comparedependency2 - the second dotnet dependency to compareCopyright © 2012–2020 OWASP. All rights reserved.