Class SingletonAdapterImpl
java.lang.Object
org.eclipse.emf.common.notify.impl.SingletonAdapterImpl
- All Implemented Interfaces:
Adapter,Adapter.Internal
An alternate, extensible adapter implementation that is well suited to adapt for a number of objects
(typically all objects of a given type).
- Since:
- 2.2
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.emf.common.notify.Adapter
Adapter.Internal -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddispose()Removes the adapter from all its targets.Returns the target from which the adapter receives notification.booleanisAdapterForType(Object type) ReturnsfalsevoidDoes nothing; clients may override so that it does something.voidSets the target from which the adapter will receive notification.voidunsetTarget(Notifier target) Unsets the target from which the adapter will receive notification.
-
Field Details
-
targets
The list of all the targets to which this adapter is set.
-
-
Constructor Details
-
SingletonAdapterImpl
public SingletonAdapterImpl()Creates an instance.
-
-
Method Details
-
isAdapterForType
Returnsfalse- Specified by:
isAdapterForTypein interfaceAdapter- Parameters:
type- the type.- Returns:
false- See Also:
-
notifyChanged
Does nothing; clients may override so that it does something.- Specified by:
notifyChangedin interfaceAdapter- Parameters:
msg- a description of the change.
-
getTarget
Description copied from interface:AdapterReturns the target from which the adapter receives notification. In general, an adapter may be shared by more than one notifier. -
setTarget
Description copied from interface:AdapterSets the target from which the adapter will receive notification. This method is only to be called by a notifier when this adapter is added to or removed from its adapter list. In general, an adapter may be shared by more than one notifier. -
unsetTarget
Description copied from interface:Adapter.InternalUnsets the target from which the adapter will receive notification. This method is only to be called by a notifier when this adapter is removed from its adapter list. In general, an adapter may be shared by more than one notifier, so this mechanism allows the adapter to know specifically which notifier will no longer be notifying.- Specified by:
unsetTargetin interfaceAdapter.Internal- Parameters:
target- the old notifier.- See Also:
-
dispose
public void dispose()Removes the adapter from all its targets.
-