Class JarFileHashAnalyzer

  extended by org.codehaus.plexus.logging.AbstractLogEnabled
      extended by org.apache.maven.shared.jar.identification.hash.JarFileHashAnalyzer
All Implemented Interfaces:
JarHashAnalyzer, LogEnabled

public class JarFileHashAnalyzer
extends AbstractLogEnabled
implements JarHashAnalyzer

Analyzer that calculates the hash code for the entire file. Can be used to detect an exact copy of the file.

If you are not using Plexus, you must call setDigester(org.codehaus.plexus.digest.Digester) before use

'Plexus Component:'
role="org.apache.maven.shared.jar.identification.hash.JarHashAnalyzer" role-hint="file"

Constructor Summary
Method Summary
 String computeHash(JarAnalyzer jarAnalyzer)
          Compute the hash for the JAR.
 void setDigester(org.codehaus.plexus.digest.Digester digester)
Methods inherited from class org.codehaus.plexus.logging.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public JarFileHashAnalyzer()
Method Detail


public String computeHash(JarAnalyzer jarAnalyzer)
Description copied from interface: JarHashAnalyzer
Compute the hash for the JAR. The hashcode will then be cached in the JAR data class for later use.

Specified by:
computeHash in interface JarHashAnalyzer
jarAnalyzer - the JAR analyzer to use to obtain the entries to hash
the hash, or null if not able to be computed due to an exception.


public void setDigester(org.codehaus.plexus.digest.Digester digester)

Copyright © 2002-2010 The Apache Software Foundation. All Rights Reserved.