org.rcfaces.core.lang
Interface IAdapterFactory


public interface IAdapterFactory

An adapter factory defines behavioral extensions for one or more classes that implements the IAdaptable interface. Adapter factories are registered with an adapter manager.

Clients may implement this interface.

Version:
$Revision: 1.2 $ $Date: 2007/05/24 12:26:17 $
Author:
Eclipse Team (latest modification by $Author: oeuillot $)

Method Summary
 Object getAdapter(Object adaptableObject, Class adapterType, Object parameter)
          Returns an object which is an instance of the given class associated with the given object.
 Class[] getAdapterList()
          Returns the collection of adapter types handled by this factory.
 

Method Detail

getAdapter

Object getAdapter(Object adaptableObject,
                  Class adapterType,
                  Object parameter)
Returns an object which is an instance of the given class associated with the given object. Returns null if no such object can be found.

Parameters:
adaptableObject - the adaptable object being queried (usually an instance of IAdaptable)
adapterType - the type of adapter to look up
Returns:
a object castable to the given adapter type, or null if this adapter factory does not have an adapter of the given type for the given object

getAdapterList

Class[] getAdapterList()
Returns 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 getAdapter requests.

Returns:
the collection of adapter types


Copyright © 2006-2011 Vedana. All Rights Reserved.