|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A factory for creating adapters and associating them with notifiers. An implementation may choose to associate one adapter with multiple notifiers.
Method Summary | |
Adapter |
adapt(Notifier target,
Object type)
Returns either a previously associated adapter or a newly associated adapter, as appropriate. |
Object |
adapt(Object object,
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,
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(Object type)
Returns whether this factory supports adapters for the given type. |
Method Detail |
public boolean isFactoryForType(Object type)
type
- the key indicating the type of adapter in question.
Adapter.isAdapterForType(java.lang.Object)
public Object adapt(Object object, Object type)
object
- arbitrary object to adapt.type
- the key indicating the type of adapter required.
public Adapter adapt(Notifier target, Object type)
create
a new adapter.
target
- the notifier to adapt.type
- the key indicating the type of adapter required.
Adapter.setTarget(org.eclipse.emf.common.notify.Notifier)
,
adaptNew(org.eclipse.emf.common.notify.Notifier, java.lang.Object)
public Adapter adaptNew(Notifier target, 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.
Adapter.setTarget(org.eclipse.emf.common.notify.Notifier)
,
Notifier.eAdapters()
public void adaptAllNew(Notifier notifier)
notifier
- notifier to adapt.adaptNew(org.eclipse.emf.common.notify.Notifier, java.lang.Object)
|
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 |