| |
|
| java.lang.Object org.ow2.easybeans.rpc.util.Hash
Hash | final public class Hash (Code) | | Utility class providing some hashing methods on java.lang.reflect.Method or
java.lang.Class.
author: Florent Benoit |
Method Summary | |
public static Map<Long, Method> | hashClass(Class clz) Gets a map between an hash and its associated method.
Parameters: clz - the class to analyze. | public static long | hashMethod(Method method) Computes the hash for a given method.
The method hash to be used for the opnum parameter is a 64-bit (long)
integer computed from the first two 32-bit values of the message digest
of a particular byte stream using the National Institute of Standards and
Technology (NIST) Secure Hash Algorithm (SHA-1). |
hashClass | public static Map<Long, Method> hashClass(Class clz)(Code) | | Gets a map between an hash and its associated method.
Parameters: clz - the class to analyze. a map with an hash and its associated method. |
hashMethod | public static long hashMethod(Method method)(Code) | | Computes the hash for a given method.
The method hash to be used for the opnum parameter is a 64-bit (long)
integer computed from the first two 32-bit values of the message digest
of a particular byte stream using the National Institute of Standards and
Technology (NIST) Secure Hash Algorithm (SHA-1). This byte stream
contains a string as if it was written using the
java.io.DataOutput.writeUTF method, consisting of the remote method's
name followed by its method descriptor (see section 4.3.3 of The Java
Virtual Machine Specification (JVMS) for a description of method
descriptors). The 64-bit hash value is the little-endian composition of
an eight byte sequence where the first four bytes are the first 32-bit
value of the message digest in big-endian byte order and the last four
bytes are the second 32-bit value of the message digest in big-endian
byte order.
Parameters: method - the given method. the computed hash. See Also: Method
* hashing of RMI |
|
|
|