class HippyMethodInvoker extends MethodInvoker {

	@Override
	protected Method findMatchingMethod() {<FILL_FUNCTION_BODY>}

}

		String targetMethod = getTargetMethod();
		Object[] arguments = getArguments();

		Method[] candidates = ReflectionUtils.getAllDeclaredMethods(getTargetClass());
		int minTypeDiffWeight = Integer.MAX_VALUE;
		Method matchingMethod = null;

		Object[] transformedArguments = null;

		for (Method candidate : candidates) {
			if (candidate.getName().equals(targetMethod)) {
				Class<?>[] paramTypes = candidate.getParameterTypes();
				Object[] candidateArguments = new Object[paramTypes.length];
				int assignedParameterCount = 0;
				for (Object argument : arguments) {
					for (int i = 0; i < paramTypes.length; i++) {
						// Pick the first assignable of the right type that
						// matches this slot and hasn't already been filled...
						if (ClassUtils.isAssignableValue(paramTypes[i], argument) && candidateArguments[i] == null) {
							candidateArguments[i] = argument;
							assignedParameterCount++;
							break;
						}
					}
				}
				if (paramTypes.length == assignedParameterCount) {
					int typeDiffWeight = getTypeDifferenceWeight(paramTypes, candidateArguments);
					if (typeDiffWeight < minTypeDiffWeight) {
						minTypeDiffWeight = typeDiffWeight;
						matchingMethod = candidate;
						transformedArguments = candidateArguments;
					}
				}
			}
		}

		if (transformedArguments == null) {
			throw new IllegalArgumentException("No matching arguments found for method: " + targetMethod);
		}

		setArguments(transformedArguments);
		return matchingMethod;

	
<methods>public void <init>() ,public java.lang.Object[] getArguments() ,public java.lang.reflect.Method getPreparedMethod() throws java.lang.IllegalStateException,public Class<?> getTargetClass() ,public java.lang.String getTargetMethod() ,public java.lang.Object getTargetObject() ,public static int getTypeDifferenceWeight(Class<?>[], java.lang.Object[]) ,public java.lang.Object invoke() throws java.lang.reflect.InvocationTargetException, java.lang.IllegalAccessException,public boolean isPrepared() ,public void prepare() throws java.lang.ClassNotFoundException, java.lang.NoSuchMethodException,public transient void setArguments(java.lang.Object[]) ,public void setStaticMethod(java.lang.String) ,public void setTargetClass(Class<?>) ,public void setTargetMethod(java.lang.String) ,public void setTargetObject(java.lang.Object) <variables>private static final java.lang.Object[] EMPTY_ARGUMENTS,private java.lang.Object[] arguments,private java.lang.reflect.Method methodObject,private java.lang.String staticMethod,protected Class<?> targetClass,private java.lang.String targetMethod,private java.lang.Object targetObject