org.mockito.internal.invocation
Class InvocationMatcher

java.lang.Object
  extended by org.mockito.internal.invocation.InvocationMatcher
All Implemented Interfaces:
PrintableInvocation, CanPrintInMultilines
Direct Known Subclasses:
StubbedInvocationMatcher

public class InvocationMatcher
extends java.lang.Object
implements PrintableInvocation, CanPrintInMultilines


Constructor Summary
InvocationMatcher(Invocation invocation)
           
InvocationMatcher(Invocation invocation, java.util.List<org.hamcrest.Matcher> matchers)
           
 
Method Summary
 Invocation getInvocation()
           
 java.util.List<org.hamcrest.Matcher> getMatchers()
           
 java.lang.reflect.Method getMethod()
           
 boolean hasSameMethod(Invocation candidate)
           
 boolean hasSimilarMethod(Invocation candidate)
          similar means the same method name, same mock, unverified and: if arguments are the same cannot be overloaded
 boolean matches(Invocation actual)
           
 boolean printsInMultilines()
           
 java.lang.String toMultilineString()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InvocationMatcher

public InvocationMatcher(Invocation invocation,
                         java.util.List<org.hamcrest.Matcher> matchers)

InvocationMatcher

public InvocationMatcher(Invocation invocation)
Method Detail

getMethod

public java.lang.reflect.Method getMethod()

getInvocation

public Invocation getInvocation()

getMatchers

public java.util.List<org.hamcrest.Matcher> getMatchers()

toString

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

printsInMultilines

public boolean printsInMultilines()
Specified by:
printsInMultilines in interface CanPrintInMultilines

toMultilineString

public java.lang.String toMultilineString()
Specified by:
toMultilineString in interface CanPrintInMultilines

matches

public boolean matches(Invocation actual)

hasSimilarMethod

public boolean hasSimilarMethod(Invocation candidate)
similar means the same method name, same mock, unverified and: if arguments are the same cannot be overloaded


hasSameMethod

public boolean hasSameMethod(Invocation candidate)