org.jboss.ejb3.interceptors.lang
Class ClassHelper

java.lang.Object
  extended by org.jboss.ejb3.interceptors.lang.ClassHelper

public class ClassHelper
extends java.lang.Object

Methods which should have been in Class.


Constructor Summary
ClassHelper()
           
 
Method Summary
static java.lang.reflect.Method[] getAllMethods(java.lang.Class<?> cls)
          Returns all public, private and package protected methods including inherited ones.
static java.util.Map<java.lang.String,java.util.List<java.lang.reflect.Method>> getAllMethodsMap(java.lang.Class<?> cls)
          Returns all public, private and package protected methods including inherited ones in a map indexed by name.
static java.lang.reflect.Method getMethod(java.lang.Class<?> cls, java.lang.String methodName)
          Returns the method with the specified method name.
static java.lang.reflect.Method getMethod(java.lang.Class<?> cls, java.lang.String methodName, java.lang.Class<?>... params)
          Returns the method with the specified method name and parameters.
static boolean isOverridden(java.lang.Class<?> icptr, 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

ClassHelper

public ClassHelper()
Method Detail

getAllMethods

public static java.lang.reflect.Method[] getAllMethods(java.lang.Class<?> cls)
Returns all public, private and package protected methods including inherited ones. (Slow method)

Parameters:
cls -
Returns:

getMethod

public static java.lang.reflect.Method getMethod(java.lang.Class<?> cls,
                                                 java.lang.String methodName)
                                          throws java.lang.NoSuchMethodException
Returns the method with the specified method name. (Slow method)

Parameters:
methodName -
Returns:
Throws:
java.lang.NoSuchMethodException

getMethod

public static java.lang.reflect.Method getMethod(java.lang.Class<?> cls,
                                                 java.lang.String methodName,
                                                 java.lang.Class<?>... params)
                                          throws java.lang.NoSuchMethodException
Returns the method with the specified method name and parameters.

Parameters:
cls -
methodName -
params -
Returns:
Throws:
java.lang.NoSuchMethodException

getAllMethodsMap

public static java.util.Map<java.lang.String,java.util.List<java.lang.reflect.Method>> getAllMethodsMap(java.lang.Class<?> cls)
Returns all public, private and package protected methods including inherited ones in a map indexed by name. (Slow method)

Parameters:
cls -
Returns:

isOverridden

public static boolean isOverridden(java.lang.Class<?> icptr,
                                   java.lang.reflect.Method method)