com.agical.rmock.core.action
Class ReturnAction

java.lang.Object
  extended by com.agical.rmock.core.action.ReturnAction
All Implemented Interfaces:
Action

public class ReturnAction
extends java.lang.Object
implements Action

(c) Agical AB 2005

Author:
joakim.ohlrogge

Constructor Summary
ReturnAction(java.lang.Object valueToReturn)
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 int hashCode()
           
 java.lang.Object invocation(java.lang.Object[] arguments, MethodHandle methodHandle)
          Called when an invocation is made.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReturnAction

public ReturnAction(java.lang.Object valueToReturn)
Parameters:
object - valueToReturn
Method Detail

invocation

public java.lang.Object invocation(java.lang.Object[] arguments,
                                   MethodHandle methodHandle)
Description copied from interface: Action
Called when an invocation is made.

Specified by:
invocation in interface Action
Parameters:
arguments - The arguments passed to the invoked method
methodHandle - A method handle that can optionally be used to invoke the equivalent method of the mocked/intercepted class.
Returns:
The value to return, null if this action represents a void method.
See Also:
com.agical.rmock.core.InvocationHandler#invocation(java.lang.Object[], com.agical.rmock.core.MethodHandle)

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object


Copyright © 2005-2009 Agical AB. All Rights Reserved.