@ThreadSafe public class AssemblyAnalyzer extends AbstractFileTypeAnalyzer
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEPENDENCY_ECOSYSTEM
A descriptor for the type of dependencies processed or added by this
analyzer.
|
Constructor and Description |
---|
AssemblyAnalyzer() |
Modifier and Type | Method and Description |
---|---|
protected static void |
addMatchingValues(java.util.List<java.lang.String> packages,
java.lang.String value,
Dependency dep,
EvidenceType type)
Cycles through the collection of class name information to see if parts
of the package names are contained in the provided value.
|
void |
analyzeDependency(Dependency dependency,
Engine engine)
Performs the analysis on a single Dependency.
|
protected java.util.List<java.lang.String> |
buildArgumentList()
Builds the beginnings of a List for ProcessBuilder
|
void |
closeAnalyzer()
Removes resources used from the local file system.
|
AnalysisPhase |
getAnalysisPhase()
Returns the phase this analyzer runs under.
|
protected java.lang.String |
getAnalyzerEnabledSettingKey()
Returns the key used in the properties file to reference the analyzer's
enabled property.
|
protected java.io.FileFilter |
getFileFilter()
Returns the
FileFilter used to determine which files are
to be analyzed. |
java.lang.String |
getName()
Gets this analyzer's name.
|
void |
prepareFileTypeAnalyzer(Engine engine)
Initialize the analyzer.
|
accept, getFilesMatched, newHashSet, prepareAnalyzer, setFilesMatched
analyze, close, getSettings, initialize, isEnabled, prepare, setEnabled, supportsParallelProcessing
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
analyze, close, initialize, isEnabled, prepare, supportsParallelProcessing
public static final java.lang.String DEPENDENCY_ECOSYSTEM
protected java.util.List<java.lang.String> buildArgumentList()
public void analyzeDependency(Dependency dependency, Engine engine) throws AnalysisException
analyzeDependency
in class AbstractAnalyzer
dependency
- the dependency to analyzeengine
- the engine to perform the analysis underAnalysisException
- if anything goes sidewayspublic void prepareFileTypeAnalyzer(Engine engine) throws InitializationException
prepareFileTypeAnalyzer
in class AbstractFileTypeAnalyzer
engine
- a reference to the dependency-check engineInitializationException
- thrown if anything goes wrongpublic void closeAnalyzer() throws java.lang.Exception
closeAnalyzer
in class AbstractAnalyzer
java.lang.Exception
- thrown if there is a problem closing the analyzerprotected java.io.FileFilter getFileFilter()
AbstractFileTypeAnalyzer
Returns the FileFilter
used to determine which files are
to be analyzed. An example would be an analyzer that inspected Java jar
files. Implementors may use
FileFilterBuilder
.
If the analyzer returns null it will not cause additional files to be analyzed, but will be executed against every file loaded.
getFileFilter
in class AbstractFileTypeAnalyzer
public java.lang.String getName()
public AnalysisPhase getAnalysisPhase()
protected java.lang.String getAnalyzerEnabledSettingKey()
getAnalyzerEnabledSettingKey
in class AbstractAnalyzer
protected static void addMatchingValues(java.util.List<java.lang.String> packages, java.lang.String value, Dependency dep, EvidenceType type)
packages
- a collection of class name informationvalue
- the value to check to see if it contains a package namedep
- the dependency to add new entries tootype
- the type of evidence (vendor, product, or version)Copyright© 2012-21 Jeremy Long. All Rights Reserved.