Class JarFileHashAnalyzer
- java.lang.Object
-
- org.codehaus.plexus.logging.AbstractLogEnabled
-
- org.apache.maven.shared.jar.identification.hash.JarFileHashAnalyzer
-
- All Implemented Interfaces:
JarHashAnalyzer
,org.codehaus.plexus.logging.LogEnabled
public class JarFileHashAnalyzer extends org.codehaus.plexus.logging.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 callsetDigester(org.codehaus.plexus.digest.Digester)
before use
-
-
Constructor Summary
Constructors Constructor Description JarFileHashAnalyzer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
computeHash(JarAnalyzer jarAnalyzer)
Compute the hash for the JAR.void
setDigester(org.codehaus.plexus.digest.Digester digester)
-
-
-
Method Detail
-
computeHash
public java.lang.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 interfaceJarHashAnalyzer
- Parameters:
jarAnalyzer
- the JAR analyzer to use to obtain the entries to hash- Returns:
- the hash, or null if not able to be computed due to an exception.
-
setDigester
public void setDigester(org.codehaus.plexus.digest.Digester digester)
-
-