The Free and Open Productivity Suite
Released: Apache OpenOffice 4.1.15
UNO Java Runtime
Class WeakAdapter

All Implemented Interfaces:
XAdapter, XInterface

public class WeakAdapter
extends java.lang.Object
implements XAdapter

An XAdapter implementation that holds a weak reference (java.lang.ref.WeakReference) to an object. Clients can register listener ( which are notified when the the object (the one which is kept weak) is being finalized. That is, that object is being destroyed because there are not any hard references to it.

Field Summary
Fields inherited from interface
Constructor Summary
WeakAdapter(java.lang.Object component)
Method Summary
 void addReference(XReference xReference)
          Method of
 java.lang.Object queryAdapted()
          Method of
 void removeReference(XReference xReference)
          Method of
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public WeakAdapter(java.lang.Object component)
component - the object that is to be held weak
Method Detail


public java.lang.Object queryAdapted()
Method of It is called to obtain a hard reference to the object which is kept weak by this instance.

Specified by:
queryAdapted in interface XAdapter
hard reference to the object


public void removeReference(XReference xReference)
Method of Called by clients to register listener which are notified when the weak object is dying.

Specified by:
removeReference in interface XAdapter
xReference - a listener


public void addReference(XReference xReference)
Method of Called by clients to unregister listeners.

Specified by:
addReference in interface XAdapter

UNO Java Runtime

Apache Software Foundation

Copyright & License | Privacy | Contact Us | Donate | Thanks

Apache, OpenOffice, and the seagull logo are registered trademarks of The Apache Software Foundation. The Apache feather logo is a trademark of The Apache Software Foundation. Other names appearing on the site may be trademarks of their respective owners.