wyvern.util
Class NullObjectFactory.NullInvocationHandler

java.lang.Object
  extended bywyvern.util.NullObjectFactory.NullInvocationHandler
All Implemented Interfaces:
java.lang.reflect.InvocationHandler
Enclosing class:
NullObjectFactory

public static class NullObjectFactory.NullInvocationHandler
extends java.lang.Object
implements java.lang.reflect.InvocationHandler

Routes all interface calls to null (returns empty strings and other zero-values for methods with return types). Eventually I'll allow people to pass in their own InvocationHandlers so they can do something fancier with the calls.


Constructor Summary
NullObjectFactory.NullInvocationHandler()
           
 
Method Summary
 java.lang.Object invoke(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args)
          Someone invoked a method on the proxy object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NullObjectFactory.NullInvocationHandler

public NullObjectFactory.NullInvocationHandler()
Method Detail

invoke

public java.lang.Object invoke(java.lang.Object proxy,
                               java.lang.reflect.Method method,
                               java.lang.Object[] args)
                        throws java.lang.Throwable
Someone invoked a method on the proxy object. By default, does nothing.

Specified by:
invoke in interface java.lang.reflect.InvocationHandler
Throws:
java.lang.Throwable