|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface AdapterFactory
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,
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. |
Method Detail |
---|
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)
object
- arbitrary object to adapt.type
- the key indicating the type of adapter required.
Adapter adapt(Notifier target, java.lang.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)
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.
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)
|
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 |