org.unitils.mock.dummy
Class DummyObjectUtil.DummyObjectInvocationHandler

java.lang.Object
  extended by org.unitils.mock.dummy.DummyObjectUtil.DummyObjectInvocationHandler
All Implemented Interfaces:
ProxyInvocationHandler
Enclosing class:
DummyObjectUtil

public static class DummyObjectUtil.DummyObjectInvocationHandler
extends Object
implements ProxyInvocationHandler

Invocation handler for the dummy proxy object that will return default values for every invocation.


Constructor Summary
DummyObjectUtil.DummyObjectInvocationHandler(Class<?> dummyObjectType, MockBehavior mockBehavior)
           
 
Method Summary
 Object handleInvocation(ProxyInvocation invocation)
          Handles the given method invocation of the dummy object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DummyObjectUtil.DummyObjectInvocationHandler

public DummyObjectUtil.DummyObjectInvocationHandler(Class<?> dummyObjectType,
                                                    MockBehavior mockBehavior)
Method Detail

handleInvocation

public Object handleInvocation(ProxyInvocation invocation)
                        throws Throwable
Handles the given method invocation of the dummy object.

Specified by:
handleInvocation in interface ProxyInvocationHandler
Parameters:
invocation - The method invocation, not null
Returns:
The result value for the method invocation
Throws:
Throwable


Copyright © 2011. All Rights Reserved.