Package org.jmock.api
Class Invocation
java.lang.Object
org.jmock.api.Invocation
- All Implemented Interfaces:
org.hamcrest.SelfDescribing
The static details about a method and the run-time details of its invocation.
- Since:
- 1.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Support distinguish between building expectations and asserting against expectations. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Method
private final Object
private final Invocation.ExpectationMode
static final Object[]
private final Object[]
-
Constructor Summary
ConstructorsConstructorDescriptionInvocation
(Object invoked, Method method, Object... parameterValues) Invocation
(Invocation.ExpectationMode mode, Object invoked, Method method, Object... parameterValues) Invocation
(Invocation.ExpectationMode mode, Invocation other) -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
describeTo
(org.hamcrest.Description description) boolean
boolean
equals
(Invocation other) private void
failIfReturnTypeIsNotNull
(Object result) private void
getParameter
(int i) int
Object[]
int
hashCode()
private boolean
isBoxedType
(Class<?> primitiveType, Class<?> referenceType) boolean
private boolean
isCompatible
(Class<?> returnType, Class<?> valueType) private void
reportTypeError
(Class<?> returnType, Class<?> valueType) toString()
-
Field Details
-
NO_PARAMETERS
-
invokedObject
-
invokedMethod
-
parameterValues
-
mode
-
BOX_TYPES
-
-
Constructor Details
-
Invocation
public Invocation(Invocation.ExpectationMode mode, Object invoked, Method method, Object... parameterValues) -
Invocation
-
Invocation
-
-
Method Details
-
toString
-
equals
-
equals
-
hashCode
public int hashCode() -
describeTo
public void describeTo(org.hamcrest.Description description) - Specified by:
describeTo
in interfaceorg.hamcrest.SelfDescribing
-
getInvokedObject
-
getInvokedMethod
-
getParameterCount
public int getParameterCount() -
getParameter
-
getParametersAsArray
-
applyTo
- Throws:
Throwable
-
checkReturnTypeCompatibility
-
isCompatible
-
isBoxedType
-
failIfReturnTypeIsNotNull
-
failIfReturnTypeIsPrimitive
private void failIfReturnTypeIsPrimitive() -
reportTypeError
-
isBuildingExpectation
public boolean isBuildingExpectation()
-