org.owasp.dependencycheck.analyzer
Class JavaScriptAnalyzer

java.lang.Object
  extended by org.owasp.dependencycheck.analyzer.AbstractAnalyzer
      extended by org.owasp.dependencycheck.analyzer.JavaScriptAnalyzer
All Implemented Interfaces:
Analyzer

public class JavaScriptAnalyzer
extends AbstractAnalyzer
implements Analyzer

Used to load a JAR file and collect information that can be used to determine the associated CPE.

Author:
Jeremy Long ([email protected])

Constructor Summary
JavaScriptAnalyzer()
           
 
Method Summary
 void analyze(Dependency dependency, Engine engine)
          Loads a specified JAR file and collects information from the manifest and checksums to identify the correct CPE information.
 void close()
          The close method does nothing for this Analyzer.
 AnalysisPhase getAnalysisPhase()
          Returns the phase that the analyzer is intended to run in.
 String getName()
          Returns the name of the analyzer.
 Set<String> getSupportedExtensions()
          Returns a list of file EXTENSIONS supported by this analyzer.
 void initialize()
          The initialize method does nothing for this Analyzer.
 boolean supportsExtension(String extension)
          Returns whether or not this analyzer can process the given extension.
 
Methods inherited from class org.owasp.dependencycheck.analyzer.AbstractAnalyzer
newHashSet
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JavaScriptAnalyzer

public JavaScriptAnalyzer()
Method Detail

getSupportedExtensions

public Set<String> getSupportedExtensions()
Returns a list of file EXTENSIONS supported by this analyzer.

Specified by:
getSupportedExtensions in interface Analyzer
Returns:
a list of file EXTENSIONS supported by this analyzer.

getName

public String getName()
Returns the name of the analyzer.

Specified by:
getName in interface Analyzer
Returns:
the name of the analyzer.

supportsExtension

public boolean supportsExtension(String extension)
Returns whether or not this analyzer can process the given extension.

Specified by:
supportsExtension in interface Analyzer
Parameters:
extension - the file extension to test for support.
Returns:
whether or not the specified file extension is supported by this analyzer.

getAnalysisPhase

public AnalysisPhase getAnalysisPhase()
Returns the phase that the analyzer is intended to run in.

Specified by:
getAnalysisPhase in interface Analyzer
Returns:
the phase that the analyzer is intended to run in.

analyze

public void analyze(Dependency dependency,
                    Engine engine)
             throws AnalysisException
Loads a specified JAR file and collects information from the manifest and checksums to identify the correct CPE information.

Specified by:
analyze in interface Analyzer
Parameters:
dependency - the dependency to analyze.
engine - the engine that is scanning the dependencies
Throws:
AnalysisException - is thrown if there is an error reading the JAR file.

initialize

public void initialize()
                throws Exception
The initialize method does nothing for this Analyzer.

Specified by:
initialize in interface Analyzer
Overrides:
initialize in class AbstractAnalyzer
Throws:
Exception - thrown if there is an exception

close

public void close()
           throws Exception
The close method does nothing for this Analyzer.

Specified by:
close in interface Analyzer
Overrides:
close in class AbstractAnalyzer
Throws:
Exception - thrown if there is an exception


Copyright© 2012-13 Jeremy Long. All Rights Reserved.