Top Description Fields Constructors Methods
com.sun.javafx.property.adapter

public Class Disposer

extends Object
implements Runnable
Class Inheritance
All Implemented Interfaces
java.lang.Runnable
Imports
java.lang.ref.PhantomReference, .Reference, .ReferenceQueue, java.util.Map, java.util.concurrent.ConcurrentHashMap

This class is used for registering and disposing various data associated with java objects. The object can register itself by calling the addRecord method and providing a descendant of the Runnable class with overridden run() method. When the object becomes phantom-reachable, the run() method of the associated Runnable object will be called.

Field Summary

Modifier and TypeField and Description
private static Disposer
private static final ReferenceQueue<Object>
private static final Map<Reference<?>, Runnable>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static void
addRecord(Object
Object to be registered
target
,
Runnable
the associated Runnable object
rec
)

Registers the object and the data for later disposal.

public void
run()

Implements java.lang.Runnable.run.

Runs this operation.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

disposerInstanceback to summary
private static Disposer disposerInstance
queueback to summary
private static final ReferenceQueue<Object> queue
recordsback to summary
private static final Map<Reference<?>, Runnable> records

Constructor Detail

Disposerback to summary
public Disposer()

Method Detail

addRecordback to summary
public static void addRecord(Object target, Runnable rec)

Registers the object and the data for later disposal.

Parameters
target:Object

Object to be registered

rec:Runnable

the associated Runnable object

runback to summary
public void run()

Implements java.lang.Runnable.run.

Doc from java.lang.Runnable.run.

Runs this operation.

Annotations
@Override