com.thoughtworks.proxy.toys.nullobject
Class Null<T>

java.lang.Object
  extended by com.thoughtworks.proxy.toys.nullobject.Null<T>

public class Null<T>
extends Object

Toy factory to create proxies acting as Null Objects.

Since:
0.1
Author:
Dan North, Aslak Hellesøy, Juan Li, Jörg Schaible
See Also:
com.thoughtworks.proxy.toys.nullobject

Nested Class Summary
static class Null.NullBuild<T>
           
 
Field Summary
static Object NULL_OBJECT
          The Null Object.
static SortedMap<Object,Object> NULL_SORTED_MAP
          Immutable Null Object implementation of SortedMap.
static SortedSet<Object> NULL_SORTED_SET
          Immutable Null Object implementation of SortedSet.
 
Method Summary
static boolean isNullObject(Object object)
          Determine whether an object was created by proxy(Class).
static boolean isNullObject(Object object, ProxyFactory proxyFactory)
          Determine whether an object was created by proxy(Class) using a special ProxyFactory with the builder.
static
<T> Null.NullBuild<T>
proxy(Class<T> type)
          Creates a factory for proxy instances that is nullable.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NULL_OBJECT

public static final Object NULL_OBJECT
The Null Object.

Since:
0.1

NULL_SORTED_MAP

public static final SortedMap<Object,Object> NULL_SORTED_MAP
Immutable Null Object implementation of SortedMap.

Since:
0.1

NULL_SORTED_SET

public static final SortedSet<Object> NULL_SORTED_SET
Immutable Null Object implementation of SortedSet.

Since:
0.1
Method Detail

proxy

public static <T> Null.NullBuild<T> proxy(Class<T> type)
Creates a factory for proxy instances that is nullable.

Parameters:
type - the type implemented by the proxy
Returns:
the factory
Since:
1.0

isNullObject

public static boolean isNullObject(Object object)
Determine whether an object was created by proxy(Class).

Parameters:
object - the object to examine
Returns:
true if the object is a Null proxy.
Since:
0.1

isNullObject

public static boolean isNullObject(Object object,
                                   ProxyFactory proxyFactory)
Determine whether an object was created by proxy(Class) using a special ProxyFactory with the builder.

Parameters:
object - the object to examine
proxyFactory - the ProxyFactory to use
Returns:
true if the object is a Null proxy.
Since:
0.1


Copyright © 2005-2010 Codehaus. All Rights Reserved.