EGF Engine
Release 0.1.0

org.eclipse.egf.common.adapter
Class AbstractAdapterFactory

java.lang.Object
  extended by org.eclipse.egf.common.adapter.AbstractAdapterFactory
Direct Known Subclasses:
ElementAdapterFactory

public abstract class AbstractAdapterFactory
extends Object

Base class to implement IAdapterFactory class.


Constructor Summary
AbstractAdapterFactory()
           
 
Method Summary
 Object getAdapter(Object adaptableObject_p, Class adapterType_p)
           
protected abstract  Map<Class<?>,AdapterDescriptor> getAdapters()
          Return the map of registered adapters
static Object getPlatformAdapter(Object adaptable_p, Class<?> adapterType_p)
          Returns an object which is an instance of the given class associated with the given object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractAdapterFactory

public AbstractAdapterFactory()
Method Detail

getAdapter

public Object getAdapter(Object adaptableObject_p,
                         Class adapterType_p)
See Also:
org.eclipse.core.runtime.IAdapterFactory#getAdapter(java.lang.Object, java.lang.Class)

getAdapters

protected abstract Map<Class<?>,AdapterDescriptor> getAdapters()
Return the map of registered adapters

Returns:

getPlatformAdapter

public static Object getPlatformAdapter(Object adaptable_p,
                                        Class<?> adapterType_p)
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.

Note that this method will never cause plug-ins to be loaded. If the only suitable factory is not yet loaded, this method will return null.

Parameters:
adaptable_p - the adaptable object being queried (usually an instance of IAdaptable)
adapterType_p - the type of adapter to look up
Returns:
an object castable to the given adapter type, or null if the given adaptable object does not have an available adapter of the given type

EGF Engine
Release 0.1.0

Copyright (c) Thales Corporate Services S.A.S, 2009.

This page is made available under license. For full details see the LEGAL in the documentation book that contains this page.