public class Null
extends java.lang.Object
com.thoughtworks.proxy.toys.nullobject| Modifier and Type | Field and Description |
|---|---|
static java.lang.Object |
NULL_OBJECT
The Null
Object. |
static java.util.SortedMap |
NULL_SORTED_MAP
Immutable Null Object implementation of
SortedMap |
static java.util.SortedSet |
NULL_SORTED_SET
Immutable Null Object implementation of
SortedSet |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
isNullObject(java.lang.Object object)
Determine whether an object was created by
object(Class). |
static boolean |
isNullObject(java.lang.Object object,
ProxyFactory proxyFactory)
Determine whether an object was created by
object(Class, ProxyFactory). |
static java.lang.Object |
object(java.lang.Class type)
Generate a Null Object proxy for a specific type using the
StandardProxyFactory. |
static java.lang.Object |
object(java.lang.Class type,
ProxyFactory proxyFactory)
Generate a Null Object proxy for a specific type.
|
public static final java.lang.Object NULL_OBJECT
Object.public static final java.util.SortedMap NULL_SORTED_MAP
SortedMappublic static final java.util.SortedSet NULL_SORTED_SET
SortedSetpublic static java.lang.Object object(java.lang.Class type,
ProxyFactory proxyFactory)
Note that the method will only return a proxy if it cannot handle the type itself or null if the
type cannot be proxied.
type - the type implemented by the proxyproxyFactory - the ProxyFactory in usenullcom.thoughtworks.proxy.toys.nullobjectpublic static java.lang.Object object(java.lang.Class type)
StandardProxyFactory.
Note that the method will only return a proxy if it cannot handle the type itself or null if the
type cannot be proxied.
type - the type implemented by the proxynullcom.thoughtworks.proxy.toys.nullobjectpublic static boolean isNullObject(java.lang.Object object)
object(Class).object - the object to examinetrue if the object is a Null proxy.public static boolean isNullObject(java.lang.Object object,
ProxyFactory proxyFactory)
object(Class, ProxyFactory).object - the object to examineproxyFactory - the ProxyFactory to usetrue if the object is a Null proxy.