Class PlatformObject

    • Constructor Summary

      Constructors 
      Constructor Description
      PlatformObject()
      Constructs a new platform object.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      <T> T getAdapter​(java.lang.Class<T> adapter)
      Returns an object which is an instance of the given class associated with this object.
      • Methods inherited from class java.lang.Object

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

      • PlatformObject

        public PlatformObject()
        Constructs a new platform object.
    • Method Detail

      • getAdapter

        public <T> T getAdapter​(java.lang.Class<T> adapter)
        Returns an object which is an instance of the given class associated with this object. Returns null if no such object can be found.

        This implementation of the method declared by IAdaptable passes the request along to the platform's adapter manager; roughly Platform.getAdapterManager().getAdapter(this, adapter). Subclasses may override this method (however, if they do so, they should invoke the method on their superclass to ensure that the Platform's adapter manager is consulted).

        Specified by:
        getAdapter in interface IAdaptable
        Type Parameters:
        T - the class type
        Parameters:
        adapter - the class to adapt to
        Returns:
        the adapted object or null
        See Also:
        IAdaptable.getAdapter(Class)