org.springframework.osgi
Class GCTests

java.lang.Object
  extended by org.springframework.osgi.GCTests

public abstract class GCTests
extends Object

Utility class providing methods related to 'Garbage Collector' and WeakReferences. Normally used inside JUnit test cases.

Author:
Costin Leau

Field Summary
static int GC_ITERATIONS
          Number of iterators while calling the GC.
 
Constructor Summary
GCTests()
           
 
Method Summary
static void assertGCed(Reference reference)
           
static void assertGCed(String message, Reference reference)
          Assert that the given object reference has been reclaimed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GC_ITERATIONS

public static int GC_ITERATIONS
Number of iterators while calling the GC.

Constructor Detail

GCTests

public GCTests()
Method Detail

assertGCed

public static void assertGCed(Reference reference)

assertGCed

public static void assertGCed(String message,
                              Reference reference)
Assert that the given object reference has been reclaimed. This assertion is useful for determing if there are hard references to the given object.

Parameters:
message -
reference -


Copyright © 2006-2011 Spring Framework. All Rights Reserved.