edu.umd.cs.findbugs.ba
public class ClassHash extends Object implements XMLWriteable, Comparable<ClassHash>
Field Summary | |
---|---|
static String | CLASS_HASH_ELEMENT_NAME
XML element name for a ClassHash. |
static String | METHOD_HASH_ELEMENT_NAME
XML element name for a MethodHash. |
Constructor Summary | |
---|---|
ClassHash()
Constructor. | |
ClassHash(String className, byte[] classHash)
Constructor.
|
Method Summary | |
---|---|
int | compareTo(ClassHash other) |
ClassHash | computeHash(JavaClass javaClass)
Compute hash for given class and all of its methods.
|
byte[] | getClassHash()
Get class hash.
|
String | getClassName() |
MethodHash | getMethodHash(XMethod method)
Get method hash for given method.
|
static String | hashToString(byte[] hash)
Convert a hash to a string of hex digits.
|
boolean | isSameHash(ClassHash other)
Return whether or not this class hash has the same hash value
as the one given.
|
void | setClassHash(byte[] classHash)
Set class hash.
|
void | setMethodHash(XMethod method, byte[] methodHash)
Set method hash for given method.
|
static byte[] | stringToHash(String s)
Convert a string of hex digits to a hash.
|
void | writeXML(XMLOutput xmlOutput) |
Parameters: classHash pre-computed class hash
Parameters: javaClass the class
Returns: this object
Returns: the class hash
Returns: Returns the className.
Parameters: method the method
Returns: the MethodHash
Parameters: hash the hash
Returns: a String representation of the hash
Parameters: other another ClassHash
Returns: true if the hash values are the same, false if not
Parameters: classHash the class hash value to set
Parameters: method the method methodHash the method hash
Parameters: s string of hex digits
Returns: the hash value represented by the string