Class WeakBase

  • All Implemented Interfaces:
    com.sun.star.lang.XTypeProvider, com.sun.star.uno.XInterface, com.sun.star.uno.XWeak
    Direct Known Subclasses:
    ComponentBase

    public class WeakBase
    extends java.lang.Object
    implements com.sun.star.uno.XWeak, com.sun.star.lang.XTypeProvider
    This class can be used as the base class for UNO components. It implements the capability to be kept weak (com.sun.star.uno.XWeak) and it implements com.sun.star.lang.XTypeProvider which is necessary for using the component with StarBasic.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected static java.util.Map<java.lang.Class<?>,​Type[]> _mapTypes  
      • Fields inherited from interface com.sun.star.lang.XTypeProvider

        UNOTYPEINFO
      • Fields inherited from interface com.sun.star.uno.XWeak

        UNOTYPEINFO
    • Constructor Summary

      Constructors 
      Constructor Description
      WeakBase()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void finalize()
      Override of Object.finalize.
      byte[] getImplementationId()
      Obsolete method of XTypeProvider.
      Type[] getTypes()
      Method of XTypeProvider.
      com.sun.star.uno.XAdapter queryAdapter()
      Method of XWeak.
      • Methods inherited from class java.lang.Object

        clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • _mapTypes

        protected static java.util.Map<java.lang.Class<?>,​Type[]> _mapTypes
    • Constructor Detail

      • WeakBase

        public WeakBase()
    • Method Detail

      • queryAdapter

        public com.sun.star.uno.XAdapter queryAdapter()
        Method of XWeak. The returned XAdapter implementation can be used to keep a weak reference to this object.
        Specified by:
        queryAdapter in interface com.sun.star.uno.XWeak
        Returns:
        a com.sun.star.uno.XAdapter implementation.
      • finalize

        protected void finalize()
                         throws java.lang.Throwable
        Override of Object.finalize. When there are no references to this object anymore then the garbage collector calls this method. Thereby causing the adapter object to be notified. The adapter, in turn, notifies all listeners (com.sun.star.uno.XReference)
        Overrides:
        finalize in class java.lang.Object
        Throws:
        java.lang.Throwable
      • getTypes

        public Type[] getTypes()
        Method of XTypeProvider. It returns an array of Type objects which represent all implemented UNO interfaces of this object.
        Specified by:
        getTypes in interface com.sun.star.lang.XTypeProvider
        Returns:
        Type objects of all implemented interfaces.
      • getImplementationId

        public byte[] getImplementationId()
        Obsolete method of XTypeProvider.
        Specified by:
        getImplementationId in interface com.sun.star.lang.XTypeProvider