com.thoughtworks.proxy.toys.nullobject
Class NullInvoker
java.lang.Object
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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NullInvoker
public NullInvoker(Class<?> type,
ProxyFactory proxyFactory)
- Construct a NullInvoker.
- Parameters:
type
- the type of the proxyproxyFactory
- the ProxyFactory
to use- Since:
- 0.1
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.