Class AdapterFactoryImpl
java.lang.Object
org.eclipse.emf.common.notify.impl.AdapterFactoryImpl
- All Implemented Interfaces:
AdapterFactory
An extensible adapter factory implementation.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns either the result of callingadapt(Notifier, Object)or the result of callingresolve(Object, Object), depending on whether the target is a notifier.Returns either a previously associated adapter or a newly associated adapter, as appropriate.voidadaptAllNew(Notifier target) Creates an adapter by callingcreateAdapter(Notifier)and associates it by callingassociate.Creates an adapter by callingcreateAdapter(Notifier, Object)and associates it by callingassociate.protected voidAssociates an adapter with a notifier by adding it to the target'sadapters.protected AdaptercreateAdapter(Notifier target) Creates anAdapterImpl.protected AdaptercreateAdapter(Notifier target, Object type) Creates an adapter by callingcreateAdapter(Notifier).booleanisFactoryForType(Object type) Returnsfalse.protected ObjectReturns the object itself.
-
Constructor Details
-
AdapterFactoryImpl
public AdapterFactoryImpl()Creates an instance.
-
-
Method Details
-
isFactoryForType
Returnsfalse.- Specified by:
isFactoryForTypein interfaceAdapterFactory- Parameters:
type- the key indicating the type of adapter in question.- Returns:
false.- See Also:
-
adapt
Returns either the result of callingadapt(Notifier, Object)or the result of callingresolve(Object, Object), depending on whether the target is a notifier.- Specified by:
adaptin interfaceAdapterFactory- Parameters:
target- arbitrary object to adapt.type- the key indicating the type of adapter required.- Returns:
- either an associated adapter or the object itself.
- See Also:
-
resolve
Returns the object itself. This is called byadapt(Object, Object)for objects that aren't notifiers.- Parameters:
object- arbitrary object to adapt.type- the key indicating the type of adapter required.- Returns:
- the object itself.
- See Also:
-
adapt
Description copied from interface:AdapterFactoryReturns either a previously associated adapter or a newly associated adapter, as appropriate. It will check if the right type of adapter is already associated with the target and will return it in that case; otherwise, it willcreatea new adapter if possible.- Specified by:
adaptin interfaceAdapterFactory- Parameters:
target- the notifier to adapt.type- the key indicating the type of adapter required.- Returns:
- a previously existing associated adapter, a new associated adapter if possible, or
nullotherwise. - See Also:
-
adaptNew
Creates an adapter by callingcreateAdapter(Notifier, Object)and associates it by callingassociate.- Specified by:
adaptNewin interfaceAdapterFactory- Parameters:
target- the notifier to adapt.type- the key indicating the type of adapter required.- Returns:
- a new associated adapter.
- See Also:
-
adaptAllNew
Creates an adapter by callingcreateAdapter(Notifier)and associates it by callingassociate.- Specified by:
adaptAllNewin interfaceAdapterFactory- Parameters:
target- notifier to adapt.- See Also:
-
createAdapter
Creates an adapter by callingcreateAdapter(Notifier).- Parameters:
target- the notifier to adapt.type- the key indicating the type of adapter required.- Returns:
- a new adapter.
- See Also:
-
createAdapter
Creates anAdapterImpl.- Parameters:
target- the notifier to adapt.- Returns:
- a new adapter.
- See Also:
-
associate
Associates an adapter with a notifier by adding it to the target'sadapters.- Parameters:
adapter- the new adapter to associate.target- the notifier being adapted.
-