Package org.eclipse.compare.internal
Class AdapterFactory
java.lang.Object
org.eclipse.compare.internal.AdapterFactory
- All Implemented Interfaces:
IAdapterFactory
-
Field Summary
Fields inherited from interface org.eclipse.core.runtime.IAdapterFactory
SERVICE_PROPERTY_ADAPTABLE_CLASS, SERVICE_PROPERTY_ADAPTER_NAMES -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> TgetAdapter(Object adaptableObject, Class<T> adapterType) Returns an object which is an instance of the given class associated with the given object.Class<?>[]Returns the collection of adapter types handled by this factory.
-
Constructor Details
-
AdapterFactory
public AdapterFactory()
-
-
Method Details
-
getAdapter
Description copied from interface:IAdapterFactoryReturns an object which is an instance of the given class associated with the given object. Returnsnullif no such object can be found.- Specified by:
getAdapterin interfaceIAdapterFactory- Parameters:
adaptableObject- the adaptable object being queried (usually an instance ofIAdaptable)adapterType- the type of adapter to look up- Returns:
- a object of the given adapter type, or
nullif this adapter factory does not have an adapter of the given type for the given object
-
getAdapterList
Description copied from interface:IAdapterFactoryReturns the collection of adapter types handled by this factory.This method is generally used by an adapter manager to discover which adapter types are supported, in advance of dispatching any actual
getAdapterrequests.The default implementation collects the required classes from the
AdapterTypesannotation, if that is not used implementors must override this method.- Specified by:
getAdapterListin interfaceIAdapterFactory- Returns:
- the collection of adapter types
-