public interface AdapterFactory
Modifier and Type | Method and Description |
---|---|
Adapter |
adapt(Notifier target,
java.lang.Object type)
Returns either a previously associated adapter or a newly associated adapter, as appropriate.
|
java.lang.Object |
adapt(java.lang.Object object,
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 notifier)
Creates a new associated adapter of each type of adapter supported by this factory, as necessary.
|
Adapter |
adaptNew(Notifier target,
java.lang.Object type)
Creates a new associated adapter of the given type;
it may optionally call
setTarget on the adapter,
and it may optionally add the adapter to the target.eAdapters() . |
boolean |
isFactoryForType(java.lang.Object type)
Returns whether this factory supports adapters for the given type.
|
boolean isFactoryForType(java.lang.Object type)
type
- the key indicating the type of adapter in question.Adapter.isAdapterForType(java.lang.Object)
java.lang.Object adapt(java.lang.Object object, java.lang.Object type)
null
will typically be returned.object
- arbitrary object to adapt.type
- the key indicating the type of adapter required.null
if the type isn't supported or the object cannot be adapted to it.Adapter adapt(Notifier target, java.lang.Object type)
create
a new adapter if possible.target
- the notifier to adapt.type
- the key indicating the type of adapter required.null
otherwise.Adapter.setTarget(org.eclipse.emf.common.notify.Notifier)
,
adaptNew(org.eclipse.emf.common.notify.Notifier, java.lang.Object)
Adapter adaptNew(Notifier target, java.lang.Object type)
setTarget
on the adapter,
and it may optionally add the adapter to the target.eAdapters()
.
This is typically not called directly by clients.target
- the notifier to adapt.type
- the key indicating the type of adapter required.null
otherwise.Adapter.setTarget(org.eclipse.emf.common.notify.Notifier)
,
Notifier.eAdapters()
void adaptAllNew(Notifier notifier)
notifier
- notifier to adapt.adaptNew(org.eclipse.emf.common.notify.Notifier, java.lang.Object)