org.qi4j.test.mock.internal
Class MethodClassMatcherMockResolver
java.lang.Object
org.qi4j.test.mock.internal.MethodClassMatcherMockResolver
- All Implemented Interfaces:
- java.lang.reflect.InvocationHandler, MockResolver
public class MethodClassMatcherMockResolver
- extends java.lang.Object
- implements MockResolver, java.lang.reflect.InvocationHandler
Method Summary |
java.lang.reflect.InvocationHandler |
getInvocationHandler(java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.Object[] args)
Matches the method invocation to an invocation handler for a registered mock. |
java.lang.Object |
invoke(java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.Object[] args)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MethodClassMatcherMockResolver
public MethodClassMatcherMockResolver(java.lang.Object recordedMock,
java.lang.Class methodClass)
getInvocationHandler
public java.lang.reflect.InvocationHandler getInvocationHandler(java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.Object[] args)
- Description copied from interface:
MockResolver
- Matches the method invocation to an invocation handler for a registered mock.
- Specified by:
getInvocationHandler
in interface MockResolver
- Parameters:
proxy
- object on which the method was invokedmethod
- invoked methodargs
- invocation arguments
- Returns:
- invocation handler if this resolved can handle the call or null otherwise.
invoke
public java.lang.Object invoke(java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.Object[] args)
throws java.lang.Throwable
- Specified by:
invoke
in interface java.lang.reflect.InvocationHandler
- Throws:
java.lang.Throwable