Class WeakReference


  • public class WeakReference
    extends java.lang.Object
    This class holds weak reference to an object.

    It actually holds a reference to a com.sun.star.XAdapter implementation and obtains a hard reference if necessary.

    • Constructor Summary

      Constructors 
      Constructor Description
      WeakReference​(WeakReference obj)
      Creates an instance of this class.
      WeakReference​(java.lang.Object obj)
      Creates an instance of this class.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object get()
      Returns a hard reference to the object that is kept weak by this class.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • WeakReference

        public WeakReference​(WeakReference obj)
        Creates an instance of this class.
        Parameters:
        obj - another instance that is to be copied.
      • WeakReference

        public WeakReference​(java.lang.Object obj)
        Creates an instance of this class.
        Parameters:
        obj - XWeak implementation.
    • Method Detail

      • get

        public java.lang.Object get()
        Returns a hard reference to the object that is kept weak by this class.
        Returns:
        a hard reference to the XWeak implementation.