class ReflectionUtil {

    public static Method[] getAllMethodsOfClass(final Class<?> clazz) {
        if (clazz == null) {
            return null;
        }
        Method[] methods = null;
        Class<?> itr = clazz;
        while (itr != null && !itr.equals(Object.class)) {
            methods = (Method[]) ArrayUtil.addAll(itr.getDeclaredMethods(), methods);
            itr = itr.getSuperclass();
        }
        return methods;
    }

}