@ThreadSafe public class RetireJsAnalyzer 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 |
---|
RetireJsAnalyzer() |
Modifier and Type | Method and Description |
---|---|
boolean |
accept(java.io.File pathname)
Determines if the file can be analyzed by the analyzer.
|
void |
analyzeDependency(Dependency dependency,
Engine engine)
Analyzes the specified JavaScript file.
|
protected void |
closeAnalyzer()
Closes a given Analyzer.
|
AnalysisPhase |
getAnalysisPhase()
Returns the phase that the analyzer is intended to run in.
|
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.
|
java.lang.String |
getName()
Returns the name of the analyzer.
|
void |
initialize(Settings settings)
Initializes the analyzer with the configured settings.
|
protected void |
prepareFileTypeAnalyzer(Engine engine)
Prepares the file type analyzer for dependency analysis.
|
getFilesMatched, newHashSet, prepareAnalyzer, setFilesMatched
analyze, close, getSettings, isEnabled, prepare, setEnabled, supportsParallelProcessing
public static final java.lang.String DEPENDENCY_ECOSYSTEM
protected java.io.FileFilter getFileFilter()
getFileFilter
in class AbstractFileTypeAnalyzer
public boolean accept(java.io.File pathname)
accept
in interface java.io.FileFilter
accept
in class AbstractFileTypeAnalyzer
pathname
- the path to the filepublic void initialize(Settings settings)
initialize
in interface Analyzer
initialize
in class AbstractAnalyzer
settings
- the configured settings to useprotected void prepareFileTypeAnalyzer(Engine engine) throws InitializationException
prepareFileTypeAnalyzer
in class AbstractFileTypeAnalyzer
engine
- a reference to the dependency-check engineInitializationException
- thrown if there is an exception during
initializationpublic java.lang.String getName()
public AnalysisPhase getAnalysisPhase()
protected java.lang.String getAnalyzerEnabledSettingKey()
getAnalyzerEnabledSettingKey
in class AbstractAnalyzer
public void analyzeDependency(Dependency dependency, Engine engine) throws AnalysisException
analyzeDependency
in class AbstractAnalyzer
dependency
- the dependency to analyze.engine
- the engine that is scanning the dependenciesAnalysisException
- is thrown if there is an error reading the file
file.protected void closeAnalyzer() throws java.lang.Exception
AbstractAnalyzer
closeAnalyzer
in class AbstractAnalyzer
java.lang.Exception
- thrown if there is an exceptionCopyright© 2012-21 Jeremy Long. All Rights Reserved.