com.moesol.ref
Class AssertNoReference
java.lang.Object
java.lang.ref.Reference
java.lang.ref.WeakReference
com.moesol.ref.AssertNoReference
public class AssertNoReference
- extends WeakReference
Allow assertions to be made about strong object references.
Object test_object = new Object();
AssertNoReference ref_check = new AssertNoReference(test_object);
// use test_object
test_object = null;
assert(!ref_check.isReferenced());
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AssertNoReference
public AssertNoReference(Object referent)
isReferenced
public boolean isReferenced()
- Returns:
- true if there are strong references to
referent
.
Copyright © 2004 Moebius Solutions, Inc. All Rights Reserved.