Prechádzať zdrojové kódy

Moved MethodDefinitionSource to standalone class.

Luke Taylor 17 rokov pred
rodič
commit
f2ec8c978a

+ 39 - 0
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;
+    }
+}
+
+