org.qi4j.test.mock.internal
Class MethodClassMatcherMockResolver

java.lang.Object
  extended by org.qi4j.test.mock.internal.MethodClassMatcherMockResolver
All Implemented Interfaces:
InvocationHandler, MockResolver

public class MethodClassMatcherMockResolver
extends Object
implements MockResolver, InvocationHandler


Constructor Summary
MethodClassMatcherMockResolver(Object recordedMock, Class methodClass)
           
 
Method Summary
 InvocationHandler getInvocationHandler(Object proxy, Method method, Object[] args)
          Matches the method invocation to an invocation handler for a registered mock.
 Object invoke(Object proxy, Method method, Object[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MethodClassMatcherMockResolver

public MethodClassMatcherMockResolver(Object recordedMock,
                                      Class methodClass)
Method Detail

getInvocationHandler

public InvocationHandler getInvocationHandler(Object proxy,
                                              Method method,
                                              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 invoked
method - invoked method
args - invocation arguments
Returns:
invocation handler if this resolved can handle the call or null otherwise.

invoke

public Object invoke(Object proxy,
                     Method method,
                     Object[] args)
              throws Throwable
Specified by:
invoke in interface InvocationHandler
Throws:
Throwable