aicas logoJamaica 3.2 release 62

sun.java2d
Class Disposer

java.lang.Object
  extended by sun.java2d.Disposer
All Implemented Interfaces:
Runnable

public class Disposer
extends Object
implements Runnable

This class is used for registering and disposing the native data associated with java objects. The object can register itself by calling one of the addRecord methods and providing either the pointer to the native disposal method or a descendant of the DisposerRecord class with overridden dispose() method. When the object becomes unreachable, the dispose() method of the associated DisposerRecord object will be called.

See Also:
DisposerRecord

Field Summary
static int PHANTOM
           
static int refType
           
static int WEAK
           
 
Constructor Summary
Disposer()
           
 
Method Summary
static void addObjectRecord(Object obj, DisposerRecord rec)
           
static void addRecord(Object target, DisposerRecord rec)
          Registers the object and the native data for later disposal.
static void addRecord(Object target, long disposeMethod, long pData)
          Registers the object and the native data for later disposal.
static void addReference(Reference ref, DisposerRecord rec)
           
static ReferenceQueue getQueue()
           
 void run()
          run executes this Runnable()'s code.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WEAK

public static final int WEAK
See Also:
Constant Field Values

PHANTOM

public static final int PHANTOM
See Also:
Constant Field Values

refType

public static int refType
Constructor Detail

Disposer

public Disposer()
Method Detail

addRecord

public static void addRecord(Object target,
                             long disposeMethod,
                             long pData)
Registers the object and the native data for later disposal.

Parameters:
target - Object to be registered
disposeMethod - pointer to the native disposal method
pData - pointer to the data to be passed to the native disposal method

addRecord

public static void addRecord(Object target,
                             DisposerRecord rec)
Registers the object and the native data for later disposal.

Parameters:
target - Object to be registered
rec - the associated DisposerRecord object
See Also:
DisposerRecord

run

public void run()
Description copied from interface: Runnable
run executes this Runnable()'s code.

Specified by:
run in interface Runnable

addReference

public static void addReference(Reference ref,
                                DisposerRecord rec)

addObjectRecord

public static void addObjectRecord(Object obj,
                                   DisposerRecord rec)

getQueue

public static ReferenceQueue getQueue()

aicas logoJamaica 3.2 release 62

aicas GmbH, Karlsruhe - Germany    www.aicas.com
Copyright 2001-2008 aicas GmbH. All Rights Reserved.