core/src/main/java/org/springframework/security/util/MethodInvocationUtils.java
public static MethodInvocation createFromClass(Object targetObject, Class<?> clazz,
			String methodName, Class<?>[] classArgs, Object[] args) {
		Assert.notNull(clazz, "Class required");
		Assert.hasText(methodName, "MethodName required");

		Method method;

		try {
			method = clazz.getMethod(methodName, classArgs);
		}
		catch (NoSuchMethodException e) {
			return null;
		}

		return new SimpleMethodInvocation(targetObject, method, args);
	}
public static MethodInvocation createFromClass(Object targetObject, Class<?> clazz,
			String methodName, Class<?>[] classArgs, Object[] args) {
		Assert.notNull(clazz, "Class required");
		Assert.hasText(methodName, "MethodName required");

		Method method;

		try {
			method = clazz.getMethod(methodName, classArgs);
		}
		catch (NoSuchMethodException e) {
			return null;
		}

		return new SimpleMethodInvocation(targetObject, method, args);
	}
Generates a <code>MethodInvocation</code> for specified <code>methodName</code> on
the passed class, using the <code>args</code> to locate the method.

@param targetObject the object being invoked
@param clazz the class of object that will be used to find the relevant
<code>Method</code>
@param methodName the name of the method to find
@param classArgs arguments that are required to locate the relevant method
signature
@param args the actual arguments that should be passed to SimpleMethodInvocation
@return a <code>MethodInvocation</code>, or <code>null</code> if there was a
problem