src/main/java/com/rockagen/commons/util/ClassUtil.java
public static Method getDeclaredMethod(Class<?> clazz, boolean recursively,
			String methodName, Class<?>... parameterTypes) {

		try {
			return clazz.getDeclaredMethod(methodName,
					parameterTypes);
		} catch (NoSuchMethodException e) {
			Class<?> superClass = clazz.getSuperclass();
			if (superClass != null && recursively) {
				return getDeclaredMethod(superClass, true, methodName,
						parameterTypes);
			}
		} catch (SecurityException e) {
			log.error("{}",e.getMessage(),e);
		}
		return null;
	}
public static Method getDeclaredMethod(Class<?> clazz, boolean recursively,
			String methodName, Class<?>... parameterTypes) {

		try {
			return clazz.getDeclaredMethod(methodName,
					parameterTypes);
		} catch (NoSuchMethodException e) {
			Class<?> superClass = clazz.getSuperclass();
			if (superClass != null && recursively) {
				return getDeclaredMethod(superClass, true, methodName,
						parameterTypes);
			}
		} catch (SecurityException e) {
			log.error("{}",e.getMessage(),e);
		}
		return null;
	}
obtain method list of specified class If recursively is true, obtain
method from all class hierarchy

@param clazz class
@param recursively recursively
@param methodName method name
@param parameterTypes parameter types
@return method