Package org.jboss.util
Class MethodHashing
- java.lang.Object
-
- org.jboss.util.MethodHashing
-
public class MethodHashing extends java.lang.Object
Create a unique hash for- Version:
- $Revision$
-
-
Field Summary
Fields Modifier and Type Field Description (package private) static java.util.Map
hashMap
-
Constructor Summary
Constructors Constructor Description MethodHashing()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description 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.(package private) static java.lang.String
getTypeString(java.lang.Class cl)
static long
methodHash(java.lang.reflect.Method method)
-
-
-
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:
- the map
-
getTypeString
static java.lang.String getTypeString(java.lang.Class cl)
-
calculateHash
public static long calculateHash(java.lang.reflect.Method method)
-
-