Class JarFileHashAnalyzer

java.lang.Object
org.apache.maven.shared.jar.identification.hash.JarFileHashAnalyzer
All Implemented Interfaces:
JarHashAnalyzer

@Singleton @Named("file") public class JarFileHashAnalyzer extends Object implements JarHashAnalyzer
Analyzer that calculates the hash code for the entire file. Can be used to detect an exact copy of the file.
  • Constructor Details

    • JarFileHashAnalyzer

      public JarFileHashAnalyzer()
  • Method Details

    • computeHash

      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
      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.