com.thoughtworks.proxy.toys.nullobject
Class NullInvoker

java.lang.Object
  extended by com.thoughtworks.proxy.toys.nullobject.NullInvoker
All Implemented Interfaces:
Invoker, Serializable

public class NullInvoker
extends Object
implements Invoker

A Invoker implementation that returns always new Null objects.

Since:
0.1
Author:
Dan North
See Also:
Serialized Form

Constructor Summary
NullInvoker(Class<?> type, ProxyFactory proxyFactory)
          Construct a NullInvoker.
 
Method Summary
 Object invoke(Object proxy, Method method, Object[] args)
          Invocation of a method of the proxied object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NullInvoker

public NullInvoker(Class<?> type,
                   ProxyFactory proxyFactory)
Construct a NullInvoker.

Parameters:
type - the type of the proxy
proxyFactory - the ProxyFactory to use
Since:
0.1
Method Detail

invoke

public Object invoke(Object proxy,
                     Method method,
                     Object[] args)
              throws Throwable
Description copied from interface: Invoker
Invocation of a method of the proxied object.

Specified by:
invoke in interface Invoker
Parameters:
proxy - the proxy instance.
method - the method to invoke.
args - the arguments of the method.
Returns:
the result of the invoked method.
Throws:
Throwable - if the invoked method has thrown.


Copyright © 2005-2010 Codehaus. All Rights Reserved.