From f2ec8c978a7718044ec2397c83329120093d225e Mon Sep 17 00:00:00 2001 From: Luke Taylor Date: Mon, 27 Oct 2008 21:51:58 +0000 Subject: [PATCH] Moved MethodDefinitionSource to standalone class. --- .../method/MockMethodInvocation.java | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 core/src/test/java/org/springframework/security/intercept/method/MockMethodInvocation.java diff --git a/core/src/test/java/org/springframework/security/intercept/method/MockMethodInvocation.java b/core/src/test/java/org/springframework/security/intercept/method/MockMethodInvocation.java new file mode 100644 index 0000000000..842e4c9ab4 --- /dev/null +++ b/core/src/test/java/org/springframework/security/intercept/method/MockMethodInvocation.java @@ -0,0 +1,39 @@ +package org.springframework.security.intercept.method; + +import java.lang.reflect.AccessibleObject; +import java.lang.reflect.Method; + +import org.aopalliance.intercept.MethodInvocation; + +public class MockMethodInvocation implements MethodInvocation { + private Method method; + private Object targetObject; + + public MockMethodInvocation(Object targetObject, Class clazz, String methodName, Class... parameterTypes) + throws NoSuchMethodException { + this.method = clazz.getMethod(methodName, parameterTypes); + this.targetObject = targetObject; + } + + public Object[] getArguments() { + return null; + } + + public Method getMethod() { + return method; + } + + public AccessibleObject getStaticPart() { + return null; + } + + public Object getThis() { + return targetObject; + } + + public Object proceed() throws Throwable { + return null; + } +} + +