org.apache.commons.proxy.invoker
Class NullInvoker
java.lang.Object
org.apache.commons.proxy.invoker.NullInvoker
- All Implemented Interfaces:
- Invoker
public class NullInvoker
- extends Object
- implements Invoker
An Invoker
implementation which merely returns null for all method invocations. This class is
useful for scenarios where the "null object" design pattern is needed.
- Since:
- 1.0
- Author:
- James Carman
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NullInvoker
public NullInvoker()
invoke
public Object invoke(Object proxy,
Method method,
Object[] args)
throws Throwable
- Description copied from interface:
Invoker
- "Invokes" the method. Implementation should throw a
InvokerException
if problems arise while trying to invoke the method.
- Specified by:
invoke
in interface Invoker
- Parameters:
proxy
- the proxy objectmethod
- the method being invokedargs
- the arguments
- Returns:
- the return value
- Throws:
Throwable
- thrown by the implementation
Copyright © 2005-2008 The Apache Software Foundation. All Rights Reserved.