Top Inners Fields Constructors Methods
one.jpro.jmemorybuddy

public Class CleanupDetector

extends Object
Class Inheritance
Imports
java.lang.ref.ReferenceQueue, .WeakReference, java.util.Set, java.util.concurrent.ConcurrentHashMap

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
CleanupDetector.WeakReferenceWithRunnable

This class can be extended to provide more meta information to the method onCleanup.

Field Summary

Modifier and TypeField and Description
private static final ReferenceQueue<Object>
private static final Set<CleanupDetector.WeakReferenceWithRunnable>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static void
onCleanup(Object obj, Runnable r)

The runnable gets executed after the object has been collected by the GC.

public static void
onCleanup(CleanupDetector.WeakReferenceWithRunnable weakRef)

This version of the method can be used to provide more information in the heap dump by extending WeakReferenceWithRunnable.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

queueback to summary
private static final ReferenceQueue<Object> queue
referencesback to summary
private static final Set<CleanupDetector.WeakReferenceWithRunnable> references

Constructor Detail

CleanupDetectorback to summary
public CleanupDetector()

Method Detail

onCleanupback to summary
public static void onCleanup(Object obj, Runnable r)

The runnable gets executed after the object has been collected by the GC.

onCleanupback to summary
public static void onCleanup(CleanupDetector.WeakReferenceWithRunnable weakRef)

This version of the method can be used to provide more information in the heap dump by extending WeakReferenceWithRunnable.

one.jpro.jmemorybuddy back to summary

public Class CleanupDetector.WeakReferenceWithRunnable

extends WeakReference<Object>
Class Inheritance
Known Direct Subclasses
one.jpro.jmemorybuddy.JMemoryBuddyLive.AssertCollectableLive

This class can be extended to provide more meta information to the method onCleanup.

Field Summary

Modifier and TypeField and Description
pack-priv Runnable
r

Constructor Summary

AccessConstructor and Description
pack-priv

Field Detail

rback to summary
pack-priv Runnable r

Constructor Detail

WeakReferenceWithRunnableback to summary
pack-priv WeakReferenceWithRunnable(Object ref, Runnable r)