public class Null<T>
extends java.lang.Object
com.thoughtworks.proxy.toys.nullobject| Modifier and Type | Class and Description |
|---|---|
static class |
Null.NullBuild<T> |
| Modifier and Type | Field and Description |
|---|---|
static java.lang.Object |
NULL_OBJECT
The Null
Object. |
static java.util.SortedMap<java.lang.Object,java.lang.Object> |
NULL_SORTED_MAP
Immutable Null Object implementation of
SortedMap. |
static java.util.SortedSet<java.lang.Object> |
NULL_SORTED_SET
Immutable Null Object implementation of
SortedSet. |
private java.lang.Class<T> |
type |
| Modifier | Constructor and Description |
|---|---|
private |
Null(java.lang.Class<T> type) |
| Modifier and Type | Method and Description |
|---|---|
private T |
build(ProxyFactory proxyFactory) |
static boolean |
isNullObject(java.lang.Object object)
Determine whether an object was created by
proxy(Class). |
static boolean |
isNullObject(java.lang.Object object,
ProxyFactory proxyFactory)
Determine whether an object was created by
proxy(Class) using a special ProxyFactory with the builder. |
private static boolean |
isNullProxyObject(java.lang.Object object,
ProxyFactory proxyFactory) |
private static boolean |
isStandardNullObject(java.lang.Object object) |
static <T> Null.NullBuild<T> |
proxy(java.lang.Class<T> type)
Creates a factory for proxy instances that is nullable.
|
public static final java.lang.Object NULL_OBJECT
Object.public static final java.util.SortedMap<java.lang.Object,java.lang.Object> NULL_SORTED_MAP
SortedMap.public static final java.util.SortedSet<java.lang.Object> NULL_SORTED_SET
SortedSet.private java.lang.Class<T> type
private Null(java.lang.Class<T> type)
public static <T> Null.NullBuild<T> proxy(java.lang.Class<T> type)
type - the type implemented by the proxyprivate T build(ProxyFactory proxyFactory)
public static boolean isNullObject(java.lang.Object object)
proxy(Class).object - the object to examinetrue if the object is a Null proxy.public static boolean isNullObject(java.lang.Object object,
ProxyFactory proxyFactory)
proxy(Class) using a special ProxyFactory with the builder.object - the object to examineproxyFactory - the ProxyFactory to usetrue if the object is a Null proxy.private static boolean isStandardNullObject(java.lang.Object object)
private static boolean isNullProxyObject(java.lang.Object object,
ProxyFactory proxyFactory)