com.agical.rmock.core
Interface InvocationHandler
- All Known Implementing Classes:
- Engine
public interface InvocationHandler
An invocation handler handles invocations from mocks or intercepted objects.
An invocation handler typically records or veifies expectations but could also
do other things such as logging them.
(c) Agical AB 2005
- Author:
- joakim.ohlrogge
Method Summary |
java.lang.Object |
invocation(java.lang.String id,
java.lang.Class objectType,
java.lang.String method,
java.lang.Object[] arguments,
MethodHandle methodHandle)
Called when an invocation is made to a mock. |
NULL
static final InvocationHandler NULL
invocation
java.lang.Object invocation(java.lang.String id,
java.lang.Class objectType,
java.lang.String method,
java.lang.Object[] arguments,
MethodHandle methodHandle)
throws java.lang.Throwable
- Called when an invocation is made to a mock. An invocation handler typically records or verifies the
invication.
- Parameters:
id
- The id of the mock that made the invocationobjectType
- The type of the object that received the method invocationmethod
- The method that was invokedmethodHandle
- A callback to the original method on the receiving object.the
- arguments that was passed to the invoked method
- Returns:
- The result of the invocation
- Throws:
any
- throwable that might be thrown
java.lang.Throwable
Copyright © 2005-2008 Agical AB. All Rights Reserved.