Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.owasp.dependencycheck.analyzer
Class ArchiveAnalyzer

    java.lang.Object
      org.owasp.dependencycheck.analyzer.AbstractAnalyzer
          org.owasp.dependencycheck.analyzer.ArchiveAnalyzer

All Implemented Interfaces:
  Analyzer

    public class ArchiveAnalyzer

extends AbstractAnalyzer
implements Analyzer

An analyzer that extracts files from archives and ensures any supported files contained within the archive are added to the dependency list.

Author:
  Jeremy Long (jeremy.long@owasp.org)

Constructor Summary
`ArchiveAnalyzer()`

Method Summary
`void` | `analyze(Dependency dependency, Engine engine)` Analyzes a given dependency.
`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

### ArchiveAnalyzer

    public ArchiveAnalyzer()

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.

### 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` - is thrown if there is an exception deleting or creating temporary files

### 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 deleting temporary files

### analyze

    public void analyze(Dependency dependency,
                        Engine engine)
                 throws AnalysisException

  Analyzes a given dependency. If the dependency is an archive, such as a WAR or EAR, the contents are extracted, scanned, and added to the list of dependencies within the engine.

  Specified by:
    `analyze` in interface `Analyzer`
  Parameters:
    `dependency` - the dependency to analyze
    `engine` - the engine scanning
  Throws:
    `AnalysisException` - thrown if there is an analysis exception

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2012-2013 OWASP. All Rights Reserved.