|
||||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Objectorg.eclipse.emf.edit.provider.ComposedAdapterFactory
This provides support for composing several factories for different models into a single factory serving the union of the model objects.
| Nested Class Summary | |
|---|---|
static interface |
ComposedAdapterFactory.Descriptor
A descriptor is can create an adapter factory. |
| Field Summary | |
|---|---|
protected java.util.List |
adapterFactories
This keeps track of all the AdapterFactory delegates. |
protected ComposedAdapterFactory.Descriptor.Registry |
adapterFactoryDescriptorRegistry
This is used to demand create adapter factories from a registry. |
protected ChangeNotifier |
changeNotifier
This is used to implement IChangeNotifier |
protected ComposedAdapterFactory |
parentAdapterFactory
This is used to implement the ComposeableAdapterFactory interface. |
| Constructor Summary | |
|---|---|
ComposedAdapterFactory()
|
|
ComposedAdapterFactory(AdapterFactory adapterFactory)
|
|
ComposedAdapterFactory(AdapterFactory[] adapterFactories)
|
|
ComposedAdapterFactory(java.util.Collection adapterFactories)
|
|
ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry adapterFactoryDescriptorRegistry)
|
|
| Method Summary | |
|---|---|
Adapter |
adapt(Notifier target,
java.lang.Object type)
Returns either a previously associated adapter or a newly associated adapter, as appropriate. |
protected Adapter |
adapt(Notifier target,
java.lang.Object type,
java.util.Collection failedPackages,
java.lang.Class javaClass)
|
java.lang.Object |
adapt(java.lang.Object target,
java.lang.Object type)
Returns either an associated adapter for the object, or the object itself, depending on whether the object is a notifier that supports an adapter of the given type. |
void |
adaptAllNew(Notifier target)
Creates a new associated adapter of each type of adapter supported by this factory, as necessary. |
Adapter |
adaptNew(Notifier target,
java.lang.Object type)
This method isn't implemented and will throw and exception. |
void |
addAdapterFactory(AdapterFactory adapterFactory)
|
void |
addListener(INotifyChangedListener notifyChangedListener)
This adds another listener. |
protected AdapterFactory |
delegatedGetFactoryForTypes(java.util.Collection types)
|
void |
dispose()
This is called to dispose the object. |
void |
fireNotifyChanged(Notification notification)
This calls notifyChanged for each listener. |
AdapterFactory |
getFactoryForType(java.lang.Object type)
|
AdapterFactory |
getFactoryForTypes(java.util.Collection types)
|
ComposeableAdapterFactory |
getRootAdapterFactory()
This returns the root adapter factory that delegates to this factory. |
void |
insertAdapterFactory(AdapterFactory adapterFactory)
|
boolean |
isFactoryForType(java.lang.Object type)
Returns whether this factory supports adapters for the given type. |
void |
removeAdapterFactory(AdapterFactory adapterFactory)
|
void |
removeListener(INotifyChangedListener notifyChangedListener)
This removes a listener. |
void |
setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory)
This sets the direct parent adapter factory into which this factory is composed. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected java.util.List adapterFactories
AdapterFactory delegates.
protected ComposedAdapterFactory parentAdapterFactory
ComposeableAdapterFactory interface.
protected ChangeNotifier changeNotifier
IChangeNotifier
protected ComposedAdapterFactory.Descriptor.Registry adapterFactoryDescriptorRegistry
| Constructor Detail |
public ComposedAdapterFactory()
public ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry adapterFactoryDescriptorRegistry)
public ComposedAdapterFactory(AdapterFactory adapterFactory)
public ComposedAdapterFactory(AdapterFactory[] adapterFactories)
public ComposedAdapterFactory(java.util.Collection adapterFactories)
| Method Detail |
public boolean isFactoryForType(java.lang.Object type)
AdapterFactory
isFactoryForType in interface AdapterFactorytype - the key indicating the type of adapter in question.
Adapter.isAdapterForType(java.lang.Object)public AdapterFactory getFactoryForType(java.lang.Object type)
public AdapterFactory getFactoryForTypes(java.util.Collection types)
protected AdapterFactory delegatedGetFactoryForTypes(java.util.Collection types)
public java.lang.Object adapt(java.lang.Object target,
java.lang.Object type)
AdapterFactory
adapt in interface AdapterFactorytarget - arbitrary object to adapt.type - the key indicating the type of adapter required.
public Adapter adapt(Notifier target,
java.lang.Object type)
AdapterFactorycreate a new adapter.
adapt in interface AdapterFactorytarget - the notifier to adapt.type - the key indicating the type of adapter required.
Adapter.setTarget(org.eclipse.emf.common.notify.Notifier),
AdapterFactory.adaptNew(org.eclipse.emf.common.notify.Notifier, java.lang.Object)
protected Adapter adapt(Notifier target,
java.lang.Object type,
java.util.Collection failedPackages,
java.lang.Class javaClass)
public Adapter adaptNew(Notifier target,
java.lang.Object type)
adaptNew in interface AdapterFactorytarget - the notifier to adapt.type - the key indicating the type of adapter required.
Adapter.setTarget(org.eclipse.emf.common.notify.Notifier),
Notifier.eAdapters()public void adaptAllNew(Notifier target)
AdapterFactory
adaptAllNew in interface AdapterFactorytarget - notifier to adapt.AdapterFactory.adaptNew(org.eclipse.emf.common.notify.Notifier, java.lang.Object)public void insertAdapterFactory(AdapterFactory adapterFactory)
public void addAdapterFactory(AdapterFactory adapterFactory)
public void removeAdapterFactory(AdapterFactory adapterFactory)
public ComposeableAdapterFactory getRootAdapterFactory()
getRootAdapterFactory in interface ComposeableAdapterFactorypublic void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory)
setParentAdapterFactory in interface ComposeableAdapterFactorypublic void addListener(INotifyChangedListener notifyChangedListener)
IChangeNotifier
addListener in interface IChangeNotifierpublic void removeListener(INotifyChangedListener notifyChangedListener)
IChangeNotifier
removeListener in interface IChangeNotifierpublic void fireNotifyChanged(Notification notification)
IChangeNotifiernotifyChanged for each listener.
fireNotifyChanged in interface IChangeNotifierpublic void dispose()
IDisposable
dispose in interface IDisposable
|
Copyright 2001-2006 IBM Corporation and others. All Rights Reserved. |
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||