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, DescribedInvocation, 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(DescribedInvocation usedAt)
           
 java.lang.String toString()
          Describes the invocation in the human friendly way.
 boolean wasUsed()
           
 
Methods inherited from class org.mockito.internal.invocation.InvocationMatcher
captureArgumentsFrom, createFrom, getInvocation, getLocation, getMatchers, getMethod, hasSameMethod, hasSimilarMethod, matches
 
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(DescribedInvocation usedAt)

wasUsed

public boolean wasUsed()

toString

public java.lang.String toString()
Description copied from interface: DescribedInvocation
Describes the invocation in the human friendly way.

Specified by:
toString in interface PrintableInvocation
Specified by:
toString in interface DescribedInvocation
Overrides:
toString in class InvocationMatcher
Returns:
the description of this invocation.