|
![]() |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.thoughtworks.proxy.toys.nullobject.Null
public class Null
Toy factory to create proxies acting as Null Objects.
com.thoughtworks.proxy.toys.nullobject
Field Summary | |
---|---|
static Object |
NULL_OBJECT
The Null Object . |
static SortedMap |
NULL_SORTED_MAP
Immutable Null Object implementation of SortedMap |
static SortedSet |
NULL_SORTED_SET
Immutable Null Object implementation of SortedSet |
Method Summary | |
---|---|
static boolean |
isNullObject(Object object)
Determine whether an object was created by object(Class) . |
static boolean |
isNullObject(Object object,
ProxyFactory proxyFactory)
Determine whether an object was created by object(Class, ProxyFactory) . |
static Object |
object(Class type)
Generate a Null Object proxy for a specific type using the StandardProxyFactory . |
static Object |
object(Class type,
ProxyFactory proxyFactory)
Generate a Null Object proxy for a specific type. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final Object NULL_OBJECT
Object
.
public static final SortedMap NULL_SORTED_MAP
SortedMap
public static final SortedSet NULL_SORTED_SET
SortedSet
Method Detail |
---|
public static Object object(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 use
null
com.thoughtworks.proxy.toys.nullobject
public static Object object(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 proxy
null
com.thoughtworks.proxy.toys.nullobject
public static boolean isNullObject(Object object)
object(Class)
.
object
- the object to examine
true
if the object is a Null proxy.public static boolean isNullObject(Object object, ProxyFactory proxyFactory)
object(Class, ProxyFactory)
.
object
- the object to examineproxyFactory
- the ProxyFactory
to use
true
if the object is a Null proxy.
|
![]() |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |