org.jboss.util
Class MethodHashing

java.lang.Object
  extended byorg.jboss.util.MethodHashing

public class MethodHashing
extends java.lang.Object

Create a unique hash for


Constructor Summary
MethodHashing()
           
 
Method Summary
static long calculateHash(java.lang.reflect.Method method)
           
static long constructorHash(java.lang.reflect.Constructor method)
           
static java.lang.reflect.Constructor findConstructorByHash(java.lang.Class clazz, long hash)
           
static java.lang.reflect.Method findMethodByHash(java.lang.Class clazz, long hash)
           
static java.util.Map getInterfaceHashes(java.lang.Class intf)
          Calculate method hashes.
static long methodHash(java.lang.reflect.Method method)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MethodHashing

public MethodHashing()
Method Detail

findMethodByHash

public static java.lang.reflect.Method findMethodByHash(java.lang.Class clazz,
                                                        long hash)
                                                 throws java.lang.Exception
Throws:
java.lang.Exception

findConstructorByHash

public static java.lang.reflect.Constructor findConstructorByHash(java.lang.Class clazz,
                                                                  long hash)
                                                           throws java.lang.Exception
Throws:
java.lang.Exception

methodHash

public static long methodHash(java.lang.reflect.Method method)
                       throws java.lang.Exception
Throws:
java.lang.Exception

constructorHash

public static long constructorHash(java.lang.reflect.Constructor method)
                            throws java.lang.Exception
Throws:
java.lang.Exception

getInterfaceHashes

public static java.util.Map getInterfaceHashes(java.lang.Class intf)
Calculate method hashes. This algo is taken from RMI.

Parameters:
intf -
Returns:

calculateHash

public static long calculateHash(java.lang.reflect.Method method)