Package org.jmock.api
Class Invocation
- java.lang.Object
-
- org.jmock.api.Invocation
-
- All Implemented Interfaces:
org.hamcrest.SelfDescribing
public class Invocation extends java.lang.Object implements org.hamcrest.SelfDescribing
The static details about a method and the run-time details of its invocation.- Since:
- 1.0
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.Object[]
NO_PARAMETERS
-
Constructor Summary
Constructors Constructor Description Invocation(java.lang.Object invoked, java.lang.reflect.Method method, java.lang.Object... parameterValues)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
applyTo(java.lang.Object target)
void
checkReturnTypeCompatibility(java.lang.Object value)
void
describeTo(org.hamcrest.Description description)
boolean
equals(java.lang.Object other)
boolean
equals(Invocation other)
java.lang.reflect.Method
getInvokedMethod()
java.lang.Object
getInvokedObject()
java.lang.Object
getParameter(int i)
int
getParameterCount()
java.lang.Object[]
getParametersAsArray()
int
hashCode()
java.lang.String
toString()
-
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equals
in classjava.lang.Object
-
equals
public boolean equals(Invocation other)
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
describeTo
public void describeTo(org.hamcrest.Description description)
- Specified by:
describeTo
in interfaceorg.hamcrest.SelfDescribing
-
getInvokedObject
public java.lang.Object getInvokedObject()
-
getInvokedMethod
public java.lang.reflect.Method getInvokedMethod()
-
getParameterCount
public int getParameterCount()
-
getParameter
public java.lang.Object getParameter(int i)
-
getParametersAsArray
public java.lang.Object[] getParametersAsArray()
-
applyTo
public java.lang.Object applyTo(java.lang.Object target) throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
checkReturnTypeCompatibility
public void checkReturnTypeCompatibility(java.lang.Object value)
-
-