org.mockito.internal
Class InvocationNotifierHandler<T>

java.lang.Object
  extended by org.mockito.internal.InvocationNotifierHandler<T>
All Implemented Interfaces:
java.io.Serializable, MockHandlerInterface<T>, MockitoInvocationHandler

public class InvocationNotifierHandler<T>
extends java.lang.Object
implements MockitoInvocationHandler, MockHandlerInterface<T>

Handler, that call all listeners wanted for this mock, before delegating it to the parameterized handler. Also imposterize MockHandler, delegate all call of MockHandlerInterface to the real mockHandler

See Also:
Serialized Form

Constructor Summary
InvocationNotifierHandler(MockHandler<T> mockHandler, MockSettingsImpl settings)
           
 
Method Summary
 InvocationContainer getInvocationContainer()
           
 MockSettingsImpl getMockSettings()
           
 java.lang.Object handle(Invocation invocation)
           
 void setAnswersForStubbing(java.util.List<Answer> answers)
           
 VoidMethodStubbable<T> voidMethodStubbable(T mock)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InvocationNotifierHandler

public InvocationNotifierHandler(MockHandler<T> mockHandler,
                                 MockSettingsImpl settings)
Method Detail

handle

public java.lang.Object handle(Invocation invocation)
                        throws java.lang.Throwable
Specified by:
handle in interface MockitoInvocationHandler
Throws:
java.lang.Throwable

getMockSettings

public MockSettingsImpl getMockSettings()
Specified by:
getMockSettings in interface MockHandlerInterface<T>

voidMethodStubbable

public VoidMethodStubbable<T> voidMethodStubbable(T mock)
Specified by:
voidMethodStubbable in interface MockHandlerInterface<T>

setAnswersForStubbing

public void setAnswersForStubbing(java.util.List<Answer> answers)
Specified by:
setAnswersForStubbing in interface MockHandlerInterface<T>

getInvocationContainer

public InvocationContainer getInvocationContainer()
Specified by:
getInvocationContainer in interface MockHandlerInterface<T>