Package org.mockito.internal.matchers
Class VarargCapturingMatcher<T>
- java.lang.Object
-
- org.hamcrest.BaseMatcher<T>
-
- org.mockito.ArgumentMatcher<T>
-
- org.mockito.internal.matchers.VarargCapturingMatcher<T>
-
- All Implemented Interfaces:
java.io.Serializable
,org.hamcrest.Matcher<T>
,org.hamcrest.SelfDescribing
,CapturesArguments
,VarargMatcher
public class VarargCapturingMatcher<T> extends ArgumentMatcher<T> implements CapturesArguments, VarargMatcher, java.io.Serializable
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description VarargCapturingMatcher()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
captureFrom(java.lang.Object varArgArray)
void
describeTo(org.hamcrest.Description description)
By default this method decamelizes matchers name to promote meaningful names for matchers.java.util.List<java.util.List<T>>
getAllVarargs()
java.util.List<T>
getLastVarargs()
boolean
matches(java.lang.Object argument)
Returns whether this matcher accepts the given argument.
-
-
-
Method Detail
-
matches
public boolean matches(java.lang.Object argument)
Description copied from class:ArgumentMatcher
Returns whether this matcher accepts the given argument.The method should never assert if the argument doesn't match. It should only return false.
- Specified by:
matches
in interfaceorg.hamcrest.Matcher<T>
- Specified by:
matches
in classArgumentMatcher<T>
- Parameters:
argument
- the argument- Returns:
- whether this matcher accepts the given argument.
-
describeTo
public void describeTo(org.hamcrest.Description description)
Description copied from class:ArgumentMatcher
By default this method decamelizes matchers name to promote meaningful names for matchers.For example StringWithStrongLanguage matcher will generate 'String with strong language' description in case of failure.
You might want to override this method to provide more specific description of the matcher (useful when verification failures are reported).
- Specified by:
describeTo
in interfaceorg.hamcrest.SelfDescribing
- Overrides:
describeTo
in classArgumentMatcher<T>
- Parameters:
description
- the description to which the matcher description is appended.
-
getLastVarargs
public java.util.List<T> getLastVarargs()
-
getAllVarargs
public java.util.List<java.util.List<T>> getAllVarargs()
-
captureFrom
public void captureFrom(java.lang.Object varArgArray)
- Specified by:
captureFrom
in interfaceCapturesArguments
-
-