class ReflectionUtils {

    public static List<Method> getAllDeclaredMethods(Class<?> type) {
        List<Method> methods = new ArrayList<Method>();

        for (Class<?> baseType = type; baseType != null; baseType = baseType.getSuperclass()) {
            methods.addAll(Arrays.asList(baseType.getDeclaredMethods()));
        }

        return methods;
    }

    private  ReflectionUtils();

}