|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.hammingweight.hammock.MethodInvocation
public class MethodInvocation
The MethodInvocation
class describes a method invocation. A
method invocation is described by the invoked method, the arguments passed in
the method and the object on which the method was invoked.
Field Summary |
---|
Constructor Summary | |
---|---|
MethodInvocation(MockMethod method,
IMockObject mockObject,
java.lang.Object[] args)
Constructor. |
Method Summary | |
---|---|
MockMethod |
getMethod()
Returns the method of the invocation. |
java.lang.Object[] |
getMethodArguments()
The arguments passed to the method. |
IMockObject |
getMockObject()
Returns the Object on which the method was invoked. |
java.lang.Object |
getReturnValue()
Returns the value or throws an error or exception associated with the method invocation. |
boolean |
isEvaluated()
This method indicates whether the method has been evaluated; i.e. |
void |
setReturnValue(java.lang.Object retVal)
Sets the value that will be returned by the method. |
void |
setThrowable(java.lang.Throwable throwable)
Sets an exception or error thrown by the method. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MethodInvocation(MockMethod method, IMockObject mockObject, java.lang.Object[] args)
method
- The invoked method.mockObject
- The mock object on which the method was invoked.args
- The arguments passed in the method invocation.Method Detail |
---|
public MockMethod getMethod()
public IMockObject getMockObject()
public java.lang.Object[] getMethodArguments()
public void setReturnValue(java.lang.Object retVal)
retVal
- The value returned by the method.public void setThrowable(java.lang.Throwable throwable)
throwable
- The exception or error thrown by the method.public java.lang.Object getReturnValue() throws java.lang.Throwable
The
- error or exception that the method is expected to throw.
java.lang.Throwable
public boolean isEvaluated()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |