org.mockito.internal.stubbing
Class StubbedInvocationMatcher

java.lang.Object
  extended by org.mockito.internal.invocation.InvocationMatcher
      extended by org.mockito.internal.stubbing.StubbedInvocationMatcher
All Implemented Interfaces:
java.io.Serializable, PrintableInvocation, CapturesArgumensFromInvocation, PrintingFriendlyInvocation, Answer

public class StubbedInvocationMatcher
extends InvocationMatcher
implements Answer, java.io.Serializable

See Also:
Serialized Form

Constructor Summary
StubbedInvocationMatcher(InvocationMatcher invocation, Answer answer)
           
 
Method Summary
 void addAnswer(Answer answer)
           
 java.lang.Object answer(InvocationOnMock invocation)
           
 void markStubUsed(PrintableInvocation usedAt)
           
 java.lang.String toString()
           
 boolean wasUsed()
           
 
Methods inherited from class org.mockito.internal.invocation.InvocationMatcher
captureArgumentsFrom, createFrom, getInvocation, getLocation, getMatchers, getMethod, hasSameMethod, hasSimilarMethod, matches, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StubbedInvocationMatcher

public StubbedInvocationMatcher(InvocationMatcher invocation,
                                Answer answer)
Method Detail

answer

public java.lang.Object answer(InvocationOnMock invocation)
                        throws java.lang.Throwable
Specified by:
answer in interface Answer
Parameters:
invocation - the invocation on the mock.
Returns:
the value to be returned
Throws:
java.lang.Throwable - the throwable to be thrown

addAnswer

public void addAnswer(Answer answer)

markStubUsed

public void markStubUsed(PrintableInvocation usedAt)

wasUsed

public boolean wasUsed()

toString

public java.lang.String toString()
Specified by:
toString in interface PrintableInvocation
Overrides:
toString in class InvocationMatcher