Class AdapterManager


  • public class AdapterManager
    extends Object
    • Constructor Detail

      • AdapterManager

        public AdapterManager()
    • Method Detail

      • adapt

        public static <T> T adapt​(Object element,
                                  Class<T> type)
        Returns an adapter of the specified type for the given object or null if none. The object itself is returned if it is an instance of the specified type. If the object is adaptable and does not subclass PlatformObject, and does not provide the specified adapter directly, the platform's adapter manager is consulted for an adapter.
        Parameters:
        element - element to retrieve adapter for
        type - adapter type
        Returns:
        adapter or null