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 enumSupport distinguish between building expectations and asserting against expectations. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Methodprivate final Objectprivate final Invocation.ExpectationModestatic 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 TypeMethodDescriptionvoidvoiddescribeTo(org.hamcrest.Description description) booleanbooleanequals(Invocation other) private voidfailIfReturnTypeIsNotNull(Object result) private voidgetParameter(int i) intObject[]inthashCode()private booleanisBoxedType(Class<?> primitiveType, Class<?> referenceType) booleanprivate booleanisCompatible(Class<?> returnType, Class<?> valueType) private voidreportTypeError(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
-
describeTo
public void describeTo(org.hamcrest.Description description) - Specified by:
describeToin interfaceorg.hamcrest.SelfDescribing
-
getInvokedObject
-
getInvokedMethod
-
getParameterCount
public int getParameterCount() -
getParameter
-
getParametersAsArray
-
applyTo
-
checkReturnTypeCompatibility
-
isCompatible
-
isBoxedType
-
failIfReturnTypeIsNotNull
-
failIfReturnTypeIsPrimitive
private void failIfReturnTypeIsPrimitive() -
reportTypeError
-
isBuildingExpectation
public boolean isBuildingExpectation()
-